Mercurial > libavcodec.hg
comparison 4xm.c @ 5611:c94931b2f2e5 libavcodec
Change 4xm demuxer and video decoder to pass the video format version in
extradata instead of codec_tag.
author | rtogni |
---|---|
date | Mon, 27 Aug 2007 21:58:39 +0000 |
parents | 9b20d2534c97 |
children | 8ca682e4911d |
comparison
equal
deleted
inserted
replaced
5610:a9eb858ecee4 | 5611:c94931b2f2e5 |
---|---|
787 } | 787 } |
788 | 788 |
789 static int decode_init(AVCodecContext *avctx){ | 789 static int decode_init(AVCodecContext *avctx){ |
790 FourXContext * const f = avctx->priv_data; | 790 FourXContext * const f = avctx->priv_data; |
791 | 791 |
792 f->version= avctx->codec_tag == 0x40000; | 792 if(avctx->extradata_size != 4 || !avctx->extradata) { |
793 av_log(avctx, AV_LOG_ERROR, "extradata wrong or missing\n"); | |
794 return 1; | |
795 } | |
796 | |
797 f->version= AV_RL32(avctx->extradata) == 0x40000; | |
793 common_init(avctx); | 798 common_init(avctx); |
794 init_vlcs(f); | 799 init_vlcs(f); |
795 | 800 |
796 if(f->version) avctx->pix_fmt= PIX_FMT_RGB565; | 801 if(f->version) avctx->pix_fmt= PIX_FMT_RGB565; |
797 else avctx->pix_fmt= PIX_FMT_RGB555; | 802 else avctx->pix_fmt= PIX_FMT_RGB555; |