mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-29 14:45:55 +08:00
fix h264 no idr nal sps pps sei i slices
This commit is contained in:
parent
878f1a556e
commit
a52e9d6ba8
@ -151,6 +151,7 @@ bool H264Track::ready() {
|
|||||||
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_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);
|
||||||
}
|
}
|
||||||
@ -204,7 +205,9 @@ bool H264Track::inputFrame_l(const Frame::Ptr &frame) {
|
|||||||
if (frame->keyFrame() && !_latest_is_config_frame) {
|
if (frame->keyFrame() && !_latest_is_config_frame) {
|
||||||
insertConfigFrame(frame);
|
insertConfigFrame(frame);
|
||||||
}
|
}
|
||||||
|
if(!frame->dropAble()){
|
||||||
_latest_is_config_frame = false;
|
_latest_is_config_frame = false;
|
||||||
|
}
|
||||||
ret = VideoTrack::inputFrame(frame);
|
ret = VideoTrack::inputFrame(frame);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user