From faa8786f8f284ac0a23ff50715cfe89e9c8b9a12 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sun, 6 Sep 2020 17:56:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E4=B8=80=E4=BA=9B=E5=A5=87?= =?UTF-8?q?=E6=80=AA=E7=9A=84=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Extension/H264.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);