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:
parent
6711c6a89b
commit
cd83161ff6
1 changed files with 2 additions and 2 deletions
|
|
@ -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++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue