aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-09-30 13:10:48 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-11-26 16:58:33 +0100
commit608f928c74d821f74747e22819b4c6dfc90acbb5 (patch)
tree1d70d07600278e9922a21549c19f8f050f1abab4
parent795908eff4a219c49d9e52be5ffb86765ab0a39e (diff)
downloadffmpeg-608f928c74d821f74747e22819b4c6dfc90acbb5.tar.gz
avcodec/vp8: Do not use num_coeff_partitions in thread/buffer setup
The variable is not a constant and can lead to race conditions Fixes: repro.webm (not reproducable with FFmpeg alone) Found-by: Dale Curtis <dalecurtis@google.com> Tested-by: Dale Curtis <dalecurtis@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit dabea74d0e82ea80cd344f630497cafcb3ef872c) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/vp8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 944db5ef6d..167f8f8765 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -164,7 +164,7 @@ int update_dimensions(VP8Context *s, int width, int height, int is_vp7)
s->mb_height = (s->avctx->coded_height + 15) / 16;
s->mb_layout = is_vp7 || avctx->active_thread_type == FF_THREAD_SLICE &&
- FFMIN(s->num_coeff_partitions, avctx->thread_count) > 1;
+ avctx->thread_count > 1;
if (!s->mb_layout) { // Frame threading and one thread
s->macroblocks_base = av_mallocz((s->mb_width + s->mb_height * 2 + 1) *
sizeof(*s->macroblocks));