summaryrefslogtreecommitdiff
path: root/libavcodec/vp9.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2015-04-30 22:03:10 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-30 23:32:09 +0200
commit5935513c0ed1563a654b2e40d053f824bae93e6b (patch)
tree9e9d7bb59a2cd26392397e0629e69fbe095b7550 /libavcodec/vp9.c
parent39fbb27ec3a33438aa450d434fb764848d3162c1 (diff)
vp9: fix show-existing-frames for multi-threading.
This also fixes intra-only MT failures (it was the same bug), see trac 4526 and 4527. Tested-by: James Almer <jamrial@gmail.com> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp9.c')
-rw-r--r--libavcodec/vp9.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 13107982e1..84e2220fb7 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -3767,6 +3767,13 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
return res;
((AVFrame *)frame)->pkt_pts = pkt->pts;
((AVFrame *)frame)->pkt_dts = pkt->dts;
+ for (i = 0; i < 8; i++) {
+ if (s->next_refs[i].f->data[0])
+ ff_thread_release_buffer(ctx, &s->next_refs[i]);
+ if (s->refs[i].f->data[0] &&
+ (res = ff_thread_ref_frame(&s->next_refs[i], &s->refs[i])) < 0)
+ return res;
+ }
*got_frame = 1;
return pkt->size;
}