fix h264 no idr nal sps pps sei i slices

This commit is contained in:
xiongguangjie 2023-02-04 18:17:06 +08:00
parent 878f1a556e
commit a52e9d6ba8

View File

@ -151,6 +151,7 @@ bool H264Track::ready() {
bool H264Track::inputFrame(const Frame::Ptr &frame) {
using H264FrameInternal = FrameInternal<H264FrameNoCacheAble>;
int type = H264_TYPE(frame->data()[frame->prefixSize()]);
if ((type == H264Frame::NAL_B_P || type == H264Frame::NAL_IDR) && ready()) {
return inputFrame_l(frame);
}
@ -204,7 +205,9 @@ bool H264Track::inputFrame_l(const Frame::Ptr &frame) {
if (frame->keyFrame() && !_latest_is_config_frame) {
insertConfigFrame(frame);
}
if(!frame->dropAble()){
_latest_is_config_frame = false;
}
ret = VideoTrack::inputFrame(frame);
break;
}