summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2015-09-30 13:10:48 +0200
committerCarl Eugen Hoyos <[email protected]>2015-10-14 14:15:11 +0200
commitb46efcb2933c6adc11486104195dcd5054485246 (patch)
tree157ad98b7bed5bc4aad12d39506480f05e99557a
parent40934e0e9b632fa6c6ec22ac03b530625a027c79 (diff)
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 <[email protected]> Tested-by: Dale Curtis <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit dabea74d0e82ea80cd344f630497cafcb3ef872c)
-rw-r--r--libavcodec/vp8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 730871a12d..cb0c7cdc02 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));