# HG changeset patch # User rtogni # Date 1188251919 0 # Node ID c94931b2f2e5db2bb04da0820c1f4a6f8e3427ae # Parent a9eb858ecee4be819a3c38a343229d1f5866e97a Change 4xm demuxer and video decoder to pass the video format version in extradata instead of codec_tag. diff -r a9eb858ecee4 -r c94931b2f2e5 4xm.c --- 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);