diff --git a/src/Extension/H264.h b/src/Extension/H264.h index 9155dc01..1f1cdf10 100644 --- a/src/Extension/H264.h +++ b/src/Extension/H264.h @@ -179,7 +179,7 @@ public: */ void inputFrame(const Frame::Ptr &frame) override{ int type = H264_TYPE(*((uint8_t *)frame->data() + frame->prefixSize())); - if(type == H264Frame::NAL_SPS || type == H264Frame::NAL_SEI){ + if(type == H264Frame::NAL_SPS || type == H264Frame::NAL_PPS || type == H264Frame::NAL_SEI){ //有些设备会把SPS PPS IDR帧当做一个帧打包,所以我们要split一下 splitH264(frame->data(), frame->size(), frame->prefixSize(), [&](const char *ptr, int len, int prefix) { H264FrameInternal::Ptr sub_frame = std::make_shared(frame, (char *)ptr, len, prefix);