[FFmpeg-devel] [PATCH 6/6] avcodec/hevc: Check AV_PKT_FLAG_NEW_SEQUENCE and flush pictures out
Zhao Zhili
quinkblack at foxmail.com
Tue Mar 18 14:58:56 EET 2025
From: Zhao Zhili <zhilizhao at tencent.com>
---
libavcodec/hevc/hevcdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index 20ef821819..fd4a6e8a6f 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -3886,6 +3886,9 @@ static int hevc_receive_frame(AVCodecContext *avctx, AVFrame *frame)
old, s->dovi_ctx.cfg.dv_profile);
}
+ if (avpkt->flags & AV_PKT_FLAG_NEW_SEQUENCE)
+ s->eos = 1;
+
ret = decode_nal_units(s, avpkt->data, avpkt->size);
if (ret < 0)
return ret;
--
2.46.0
More information about the ffmpeg-devel
mailing list