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>
This commit is contained in:
Nuo Mi
2024-02-12 11:41:55 +08:00
parent eb5b4e60c9
commit 1e174120d4

View File

@@ -594,6 +594,8 @@ static int frame_context_setup(VVCFrameContext *fc, VVCContext *s)
{ {
int ret; int ret;
fc->ref = NULL;
// copy refs from the last frame // copy refs from the last frame
if (s->nb_frames && s->nb_fcs > 1) { if (s->nb_frames && s->nb_fcs > 1) {
VVCFrameContext *prev = get_frame_context(s, fc, -1); VVCFrameContext *prev = get_frame_context(s, fc, -1);