Mercurial > libavcodec.hg
changeset 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 | a9eb858ecee4 |
children | 0ffea9729a0d |
files | 4xm.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/4xm.c Mon Aug 27 10:39:31 2007 +0000 +++ b/4xm.c Mon Aug 27 21:58:39 2007 +0000 @@ -789,7 +789,12 @@ static int decode_init(AVCodecContext *avctx){ FourXContext * const f = avctx->priv_data; - f->version= avctx->codec_tag == 0x40000; + if(avctx->extradata_size != 4 || !avctx->extradata) { + av_log(avctx, AV_LOG_ERROR, "extradata wrong or missing\n"); + return 1; + } + + f->version= AV_RL32(avctx->extradata) == 0x40000; common_init(avctx); init_vlcs(f);