summaryrefslogtreecommitdiff
path: root/libavcodec/rawdec.c
diff options
context:
space:
mode:
authorami_stuff <ami_stuff@o2.pl>2011-05-24 23:38:01 +0200
committerDiego Biurrun <diego@biurrun.de>2011-06-21 22:18:59 +0200
commit67e7dc54049d9b51a0c2168c8265145a9aef7780 (patch)
treeb3ef6558ce59bb6cdf1b07b14bcb34cf39ebd62e /libavcodec/rawdec.c
parentf082a0fb420f0367bdd00219fd0fe8fe3caf7bc7 (diff)
rawdec: Fix decoding of QT WRAW files.
From some tests it results that: 1. All of the AVI/MOV WRAW files need to be flipped. 2. MOV WRAW files need to use AVI color modes. 3. Assigning PAL8 mode by default to WRAW codec is not correct.
Diffstat (limited to 'libavcodec/rawdec.c')
-rw-r--r--libavcodec/rawdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 6b3387f636..5e8e6c4c43 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -78,6 +78,8 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
if (avctx->codec_tag == MKTAG('r','a','w',' '))
avctx->pix_fmt = find_pix_fmt(pix_fmt_bps_mov, avctx->bits_per_coded_sample);
+ else if (avctx->codec_tag == MKTAG('W','R','A','W'))
+ avctx->pix_fmt = find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample);
else if (avctx->codec_tag)
avctx->pix_fmt = find_pix_fmt(ff_raw_pix_fmt_tags, avctx->codec_tag);
else if (avctx->pix_fmt == PIX_FMT_NONE && avctx->bits_per_coded_sample)
@@ -98,7 +100,7 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
avctx->coded_frame= &context->pic;
if((avctx->extradata_size >= 9 && !memcmp(avctx->extradata + avctx->extradata_size - 9, "BottomUp", 9)) ||
- avctx->codec_tag == MKTAG( 3 , 0 , 0 , 0 ))
+ avctx->codec_tag == MKTAG(3, 0, 0, 0) || avctx->codec_tag == MKTAG('W','R','A','W'))
context->flip=1;
return 0;