From 821b0e4bb6a4816a790b9f3da6e1ddbef3dca5da Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Wed, 18 Aug 2021 22:19:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=9C=80=E5=90=8E=E4=B8=80?= =?UTF-8?q?=E5=B8=A7=E6=97=B6=E9=97=B4=E6=88=B3=E7=AD=89=E4=BA=8Esps=20pps?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=88=B3=E7=9A=84=E7=9A=84=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Extension/Frame.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Extension/Frame.cpp b/src/Extension/Frame.cpp index f619c3cd..498efee4 100644 --- a/src/Extension/Frame.cpp +++ b/src/Extension/Frame.cpp @@ -203,8 +203,8 @@ bool FrameMerger::willFlush(const Frame::Ptr &frame) const{ //缓存中没有有效的能解码的帧,所以这次不flush return _frame_cache.size() > kMaxFrameCacheSize; } - if (_frame_cache.back()->dts() != frame->dts() || frame->decodeAble()) { - //时间戳变化了,或新的一帧,立即flush + if (_frame_cache.back()->dts() != frame->dts() || frame->decodeAble() || frame->configFrame()) { + //时间戳变化了,或新的一帧,或遇到config帧,立即flush return true; } return _frame_cache.size() > kMaxFrameCacheSize;