avcodec/vp3: Call ff_progress_frame_unref() before ff_progress_frame_get_buffer()

Fixes: Assertion !f->f && !f->progress failed at libavcodec/decode.c:1688
Fixes: 68190/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-5942090287611904

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-04-26 23:46:38 +02:00
parent 5eb05f4450
commit d9699464c3
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 1 additions and 0 deletions

View File

@ -2651,6 +2651,7 @@ static int vp3_decode_frame(AVCodecContext *avctx, AVFrame *frame,
if (avctx->skip_frame >= AVDISCARD_NONKEY && !s->keyframe)
return buf_size;
ff_progress_frame_unref(&s->current_frame);
ret = ff_progress_frame_get_buffer(avctx, &s->current_frame,
AV_GET_BUFFER_FLAG_REF);
if (ret < 0) {