1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

dpx: Fix rounding in 10bit total_size calculation

This could have caused out of array reads

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-02-10 17:50:56 +01:00
parent d24de4596c
commit 151067bbc2

View File

@ -159,7 +159,7 @@ static int decode_frame(AVCodecContext *avctx,
return -1;
}
avctx->pix_fmt = AV_PIX_FMT_GBRP10;
total_size = (4 * avctx->width * avctx->height * elements) / 3;
total_size = (avctx->width * avctx->height * elements + 2) / 3 * 4;
break;
case 12:
if (!packing) {