diff options
author | ami_stuff <ami_stuff@o2.pl> | 2011-05-25 01:38:01 +0400 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-05-25 02:13:09 +0400 |
commit | 040e1c67edab57177adb88a7dd1cc9ed38d2b74e (patch) | |
tree | ded4db268ac16f314fe074bb79345c029721dbe9 /libavcodec/rawdec.c | |
parent | 09525f7956508c420a5c56c8daee16e05aa3f528 (diff) |
rawdec: fix decoding of QT WRAW files
Fix decoding of QT WRAW files.
From some tests it results that:
1. all of the AVI/MOV WRAW files (at least from the link posted
to the trac ticket #108) 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
Fix decoding of file CarltonMovie2.mov, fix trac issue #108.
Diffstat (limited to 'libavcodec/rawdec.c')
-rw-r--r-- | libavcodec/rawdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index 6bf749f4c3..9702f98918 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -90,6 +90,8 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx) if (avctx->codec_tag == MKTAG('r','a','w',' ')) avctx->pix_fmt = ff_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 = ff_find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample); else if (avctx->codec_tag) avctx->pix_fmt = ff_find_pix_fmt(ff_raw_pix_fmt_tags, avctx->codec_tag); else if (avctx->pix_fmt == PIX_FMT_NONE && avctx->bits_per_coded_sample) @@ -110,7 +112,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; |