vp9: check return value of ff_thread_ref_frame().

Fixes CID 1322309.
This commit is contained in:
Ronald S. Bultje 2015-09-04 20:10:43 -04:00
parent ef8740d8e5
commit ae9344cb9f

View File

@ -4250,7 +4250,9 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
if (s->refs[i].f->data[0]) if (s->refs[i].f->data[0])
ff_thread_release_buffer(ctx, &s->refs[i]); 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) { if (!s->invisible) {