[FFmpeg-cvslog] avcodec/vvcdec: frame_context_setup, set fc->ref to NULL

Nuo Mi git at videolan.org
Wed Feb 14 06:08:02 EET 2024


ffmpeg | branch: master | Nuo Mi <nuomi2021 at gmail.com> | Mon Feb 12 11:41:55 2024 +0800| [1e174120d48a5ed86d9353018e7bb3c11636772c] | committer: Nuo Mi

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 at frankplowman.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1e174120d48a5ed86d9353018e7bb3c11636772c
---

 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);



More information about the ffmpeg-cvslog mailing list