aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp9.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2015-09-04 20:10:43 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2015-09-05 15:50:01 -0400
commitae9344cb9ffad7272acdbcb9234d912bffa75716 (patch)
treee7004c4c79445c081b98ee3fa93fefb49475e73f /libavcodec/vp9.c
parentef8740d8e58dc45950887305307206d27ad413fb (diff)
downloadffmpeg-ae9344cb9ffad7272acdbcb9234d912bffa75716.tar.gz
vp9: check return value of ff_thread_ref_frame().
Fixes CID 1322309.
Diffstat (limited to 'libavcodec/vp9.c')
-rw-r--r--libavcodec/vp9.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 76247436e8..25e7419f84 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -4250,7 +4250,9 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
for (i = 0; i < 8; i++) {
if (s->refs[i].f->data[0])
ff_thread_release_buffer(ctx, &s->refs[i]);
- ff_thread_ref_frame(&s->refs[i], &s->next_refs[i]);
+ if (s->next_refs[i].f->data[0] &&
+ (res = ff_thread_ref_frame(&s->refs[i], &s->next_refs[i])) < 0)
+ return res;
}
if (!s->invisible) {