mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
avcodec/vp9: fix leaked cbs fragment AVBufferRef
When this function returns, the fragment is never reset, so current_frag->data_ref is never unref-ed, which ends up leaking it. We call ff_cbs_fragment_reset to release the reference on its buffer. Signed-off-by: Leo Izen <leo.izen@gmail.com>
This commit is contained in:
@@ -1679,8 +1679,6 @@ static int vp9_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
&s->s.frames[CUR_FRAME] : &s->s.ref_frames[i]);
|
||||
}
|
||||
|
||||
ff_cbs_fragment_reset(&s->current_frag);
|
||||
|
||||
goto finish;
|
||||
}
|
||||
|
||||
@@ -1805,6 +1803,8 @@ static int vp9_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
}
|
||||
|
||||
finish:
|
||||
ff_cbs_fragment_reset(&s->current_frag);
|
||||
|
||||
ff_progress_frame_report(&s->s.frames[CUR_FRAME].tf, INT_MAX);
|
||||
// ref frame setup
|
||||
for (int i = 0; i < 8; i++)
|
||||
|
||||
Reference in New Issue
Block a user