aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2015-09-30 10:14:59 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-10-02 18:08:36 +0200
commit7e4070d2e70bbd0e70dd83c06089e465a0eda704 (patch)
tree7839ad2a0e1cd86b81a9b295bd447049890a6b59
parent160556c9ad1662bf175f3c62c581834dadd3b52a (diff)
downloadffmpeg-7e4070d2e70bbd0e70dd83c06089e465a0eda704.tar.gz
dnxhddec: initialize with mb-aligned dimensions
The coded size is a multiple of the macroblock size, which is 16. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/dnxhddec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index e3dec78f7f..755cf9a753 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -87,6 +87,9 @@ static av_cold int dnxhd_decode_init(AVCodecContext *avctx)
ctx->cid = -1;
avctx->colorspace = AVCOL_SPC_BT709;
+ avctx->coded_width = FFALIGN(avctx->width, 16);
+ avctx->coded_height = FFALIGN(avctx->height, 16);
+
ctx->rows = av_mallocz_array(avctx->thread_count, sizeof(RowContext));
if (!ctx->rows)
return AVERROR(ENOMEM);