From 1e174120d48a5ed86d9353018e7bb3c11636772c Mon Sep 17 00:00:00 2001 From: Nuo Mi Date: Mon, 12 Feb 2024 11:41:55 +0800 Subject: [PATCH] avcodec/vvcdec: frame_context_setup, set fc->ref to NULL fc->ref points to an old VVCFrame, which cannot be used after frame_context_setup. This prevents crashes in decode_nal_units-->ff_vvc_report_frame_finished. Signed-off-by: Frank Plowman --- libavcodec/vvc/vvcdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/vvc/vvcdec.c b/libavcodec/vvc/vvcdec.c index 8163b5ecb6..e88e746de4 100644 --- a/libavcodec/vvc/vvcdec.c +++ b/libavcodec/vvc/vvcdec.c @@ -594,6 +594,8 @@ static int frame_context_setup(VVCFrameContext *fc, VVCContext *s) { int ret; + fc->ref = NULL; + // copy refs from the last frame if (s->nb_frames && s->nb_fcs > 1) { VVCFrameContext *prev = get_frame_context(s, fc, -1);