mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avcodec/vp9: prevent null pointer use on init_frames() failure
Signed-off-by: Peter Ross <pross@xvid.org> Reviewed-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
5a2a199031
commit
1217b06a9b
@ -1216,17 +1216,14 @@ static av_cold int vp9_decode_free(AVCodecContext *avctx)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (s->s.frames[i].tf.f->buf[0])
|
||||
vp9_frame_unref(avctx, &s->s.frames[i]);
|
||||
vp9_frame_unref(avctx, &s->s.frames[i]);
|
||||
av_frame_free(&s->s.frames[i].tf.f);
|
||||
}
|
||||
av_buffer_pool_uninit(&s->frame_extradata_pool);
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (s->s.refs[i].f->buf[0])
|
||||
ff_thread_release_buffer(avctx, &s->s.refs[i]);
|
||||
ff_thread_release_buffer(avctx, &s->s.refs[i]);
|
||||
av_frame_free(&s->s.refs[i].f);
|
||||
if (s->next_refs[i].f->buf[0])
|
||||
ff_thread_release_buffer(avctx, &s->next_refs[i]);
|
||||
ff_thread_release_buffer(avctx, &s->next_refs[i]);
|
||||
av_frame_free(&s->next_refs[i].f);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user