aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNuo Mi <nuomi2021@gmail.com>2024-02-12 11:41:55 +0800
committerNuo Mi <nuomi2021@gmail.com>2024-02-14 10:09:06 +0800
commit1e174120d48a5ed86d9353018e7bb3c11636772c (patch)
treedb7b1c9f591abe8229ab9164d568a52ecbbeb031
parenteb5b4e60c9c2ad701c99f5ab2c606a66b3119341 (diff)
downloadffmpeg-1e174120d48a5ed86d9353018e7bb3c11636772c.tar.gz
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 <post@frankplowman.com>
-rw-r--r--libavcodec/vvc/vvcdec.c2
1 files changed, 2 insertions, 0 deletions
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);