在track就绪前,强制split frame,防止sps pps未被获取到

This commit is contained in:
ziyue
2022-02-17 14:32:49 +08:00
parent c997d11bd1
commit cb00dbab0f
2 changed files with 2 additions and 2 deletions

View File

@@ -148,7 +148,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) {
if ((type == H264Frame::NAL_B_P || type == H264Frame::NAL_IDR) && ready()) {
return inputFrame_l(frame);
}