]> git.sesse.net Git - ffmpeg/commitdiff
dnxhddec: initialize with mb-aligned dimensions
authorChristophe Gisquet <christophe.gisquet@gmail.com>
Wed, 30 Sep 2015 08:14:59 +0000 (10:14 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 2 Oct 2015 16:08:36 +0000 (18:08 +0200)
The coded size is a multiple of the macroblock size, which is 16.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/dnxhddec.c

index e3dec78f7ff0c0872aa1517119be41955af9c4d4..755cf9a7534cd3ed3037ff6eacb23802bb0e1927 100644 (file)
@@ -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);