优化SEI/AUD帧处理逻辑

This commit is contained in:
xia-chu
2025-06-29 18:00:47 +08:00
parent 9a7cca1ad9
commit a35444f27e
3 changed files with 20 additions and 2 deletions

View File

@@ -153,7 +153,11 @@ 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);
}