Compare commits

..

No commits in common. "a972fa85ec5ce404aa64cc7845d092b582b7e228" and "5d9ced2cf342089c57405e96276955b46967a1de" have entirely different histories.

2 changed files with 4 additions and 5 deletions

View File

@ -153,6 +153,10 @@ bool H264Track::ready() const {
bool H264Track::inputFrame(const Frame::Ptr &frame) {
using H264FrameInternal = FrameInternal<H264FrameNoCacheAble>;
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()) {
return inputFrame_l(frame);
}
@ -262,10 +266,6 @@ Track::Ptr H264Track::clone() const {
bool H264Track::inputFrame_l(const Frame::Ptr &frame) {
int type = H264_TYPE(frame->data()[frame->prefixSize()]);
if (type == H264Frame::NAL_AUD) {
// AUD帧丢弃
return false;
}
bool ret = true;
switch (type) {
case H264Frame::NAL_SPS: {

View File

@ -13,7 +13,6 @@
#include <memory>
#include <string>
#include <cstdint>
namespace mediakit {
class MediaSinkInterface;