aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/4xm.c
diff options
context:
space:
mode:
authorRoberto Togni <r_togni@tiscali.it>2007-08-27 21:58:39 +0000
committerRoberto Togni <r_togni@tiscali.it>2007-08-27 21:58:39 +0000
commitb6f508bbcc60b942b85e94997b39df4599d93866 (patch)
tree123dd51d74199a0174590226646603595d1b0bd1 /libavcodec/4xm.c
parente89d9fd89cd81099c9b6bd99b2209a7d5f966d67 (diff)
downloadffmpeg-b6f508bbcc60b942b85e94997b39df4599d93866.tar.gz
Change 4xm demuxer and video decoder to pass the video format version in
extradata instead of codec_tag. Originally committed as revision 10253 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/4xm.c')
-rw-r--r--libavcodec/4xm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 7af22c7963..83e1b92ec4 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -789,7 +789,12 @@ static void common_init(AVCodecContext *avctx){
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);