[FFmpeg-trac] #108(avcodec:closed): QT WRAW file decodes incorrectly

FFmpeg trac at avcodec.org
Thu May 26 12:41:58 CEST 2011


#108: QT WRAW file decodes incorrectly
----------------------+----------------------
Reporter:  ami_stuff  |       Owner:
    Type:  defect     |      Status:  closed
Priority:  normal     |   Component:  avcodec
 Version:  git        |  Resolution:  fixed
Keywords:             |  Blocked By:
Blocking:             |  Reproduced:  1
Analyzed:  1          |
----------------------+----------------------

Comment (by ami_stuff):

 @saste

 something like this seems to fix "nature06421-s4.mov" here (I test on big-
 endian)

 {{{
 diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
 index 9702f98..75b1e6e 100644
 --- a/libavcodec/rawdec.c
 +++ b/libavcodec/rawdec.c
 @@ -90,8 +90,12 @@ 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'))
 +    else if (avctx->codec_tag == MKTAG('W','R','A','W')){
 +       if (avctx->bits_per_coded_sample == 32)
 +        avctx->pix_fmt = PIX_FMT_BGRA;
 +       else
          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)
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/108#comment:9>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list