diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-07 21:24:06 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-07 21:39:51 +0200 |
commit | 2f284c017000065539b5ab7183a3f8140c69dfb2 (patch) | |
tree | 238b9b33fcf0013bb15d4320c83eb46f8fa70ac3 /libavcodec/dpx.c | |
parent | 0884d04dc329087e287cab345330303f8972f270 (diff) | |
download | ffmpeg-2f284c017000065539b5ab7183a3f8140c69dfb2.tar.gz |
dpxdec: Fix decoding of RGBA10
Fixes Ticket2392
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dpx.c')
-rw-r--r-- | libavcodec/dpx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c index 0d60a7e4fb..2fd5bdc879 100644 --- a/libavcodec/dpx.c +++ b/libavcodec/dpx.c @@ -152,7 +152,7 @@ static int decode_frame(AVCodecContext *avctx, return -1; } avctx->pix_fmt = AV_PIX_FMT_GBRP10; - total_size = (avctx->width * avctx->height * elements + 2) / 3 * 4; + total_size = (avctx->width * elements + 2) / 3 * 4 * avctx->height; break; case 12: if (!packing) { @@ -210,6 +210,7 @@ static int decode_frame(AVCodecContext *avctx, read10in32(&buf, &rgbBuffer, &n_datum, endian); } + n_datum = 0; for (i = 0; i < 3; i++) ptr[i] += p->linesize[i]; } |