aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-05-01 09:59:04 -0700
committerRonald S. Bultje <rsbultje@gmail.com>2012-05-02 09:57:12 -0700
commit82a0497cf317a9bf3e5d65fb13485097d0e88321 (patch)
tree7e096cc460e41e2c9f8cb10b7d208e95381ac2e2
parentbec207f9f9ed5583a8ce49b62ce73bfae1cae85b (diff)
downloadffmpeg-82a0497cf317a9bf3e5d65fb13485097d0e88321.tar.gz
vp8: update frame size changes on thread context switches.
This properly synchronizes frame size changes between threads if subsequent threads abort decoding before frame size is initialized, i.e. it prevents the thread after that from ping-ponging back to the original value. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
-rw-r--r--libavcodec/vp8.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 1c973d5bed..d9fdd4da44 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -1833,6 +1833,8 @@ static int vp8_decode_update_thread_context(AVCodecContext *dst, const AVCodecCo
(s_src->mb_width != s->mb_width || s_src->mb_height != s->mb_height)) {
free_buffers(s);
s->maps_are_invalid = 1;
+ s->mb_width = s_src->mb_width;
+ s->mb_height = s_src->mb_height;
}
s->prob[0] = s_src->prob[!s_src->update_probabilities];