Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-06-14 04:08:31 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-07-04 04:54:27 +0400
commit565140da178e8a0bc425d658d3473798d99fa058 (patch)
tree4183c97c1d0476f8cce561bece933f26a605dc88 /libavcodec/rawdec.c
parentf0bcb13aedcff8b4a454347c634ac41aefab9e86 (diff)
avcodec/rawdec: Fix 2bpp and 4bpp rawvideo in mov
Restores carefully the old behaviour (and does not break decoding avi samples). Fixes Ticket2536 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rawdec.c')
-rw-r--r--libavcodec/rawdec.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 4da212fed9..54ed52df0f 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -133,12 +133,17 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
memset(context->palette->data, 0, AVPALETTE_SIZE);
}
- context->frame_size = avpicture_get_size(avctx->pix_fmt, avctx->width,
- avctx->height);
if ((avctx->bits_per_coded_sample == 4 || avctx->bits_per_coded_sample == 2) &&
avctx->pix_fmt == AV_PIX_FMT_PAL8 &&
- (!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' ')))
+ (!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' '))) {
context->is_2_4_bpp = 1;
+ context->frame_size = avpicture_get_size(avctx->pix_fmt,
+ FFALIGN(avctx->width, 16),
+ avctx->height);
+ } else {
+ context->frame_size = avpicture_get_size(avctx->pix_fmt, avctx->width,
+ avctx->height);
+ }
if ((avctx->extradata_size >= 9 &&
!memcmp(avctx->extradata + avctx->extradata_size - 9, "BottomUp", 9)) ||