mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-24 10:37:49 +08:00
Compare commits
2 Commits
5d9ced2cf3
...
a972fa85ec
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a972fa85ec | ||
|
|
ba877759da |
@ -153,10 +153,6 @@ bool H264Track::ready() const {
|
|||||||
bool H264Track::inputFrame(const Frame::Ptr &frame) {
|
bool H264Track::inputFrame(const Frame::Ptr &frame) {
|
||||||
using H264FrameInternal = FrameInternal<H264FrameNoCacheAble>;
|
using H264FrameInternal = FrameInternal<H264FrameNoCacheAble>;
|
||||||
int type = H264_TYPE(frame->data()[frame->prefixSize()]);
|
int type = H264_TYPE(frame->data()[frame->prefixSize()]);
|
||||||
if (type == H264Frame::NAL_AUD) {
|
|
||||||
// AUD帧丢弃
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if ((type == H264Frame::NAL_B_P || type == H264Frame::NAL_IDR) && ready()) {
|
if ((type == H264Frame::NAL_B_P || type == H264Frame::NAL_IDR) && ready()) {
|
||||||
return inputFrame_l(frame);
|
return inputFrame_l(frame);
|
||||||
}
|
}
|
||||||
@ -266,6 +262,10 @@ Track::Ptr H264Track::clone() const {
|
|||||||
|
|
||||||
bool H264Track::inputFrame_l(const Frame::Ptr &frame) {
|
bool H264Track::inputFrame_l(const Frame::Ptr &frame) {
|
||||||
int type = H264_TYPE(frame->data()[frame->prefixSize()]);
|
int type = H264_TYPE(frame->data()[frame->prefixSize()]);
|
||||||
|
if (type == H264Frame::NAL_AUD) {
|
||||||
|
// AUD帧丢弃
|
||||||
|
return false;
|
||||||
|
}
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case H264Frame::NAL_SPS: {
|
case H264Frame::NAL_SPS: {
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
namespace mediakit {
|
namespace mediakit {
|
||||||
class MediaSinkInterface;
|
class MediaSinkInterface;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user