Browse Source

dpx: Fix rounding in 10bit total_size calculation

This could have caused out of array reads

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.2
Michael Niedermayer 13 years ago
parent
commit
151067bbc2
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/dpx.c

+ 1
- 1
libavcodec/dpx.c 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) {


Loading…
Cancel
Save