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
This commit is contained in:
		@@ -789,7 +789,12 @@ static void common_init(AVCodecContext *avctx){
 | 
				
			|||||||
static int decode_init(AVCodecContext *avctx){
 | 
					static int decode_init(AVCodecContext *avctx){
 | 
				
			||||||
    FourXContext * const f = avctx->priv_data;
 | 
					    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);
 | 
					    common_init(avctx);
 | 
				
			||||||
    init_vlcs(f);
 | 
					    init_vlcs(f);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -149,7 +149,9 @@ static int fourxm_read_header(AVFormatContext *s,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            st->codec->codec_type = CODEC_TYPE_VIDEO;
 | 
					            st->codec->codec_type = CODEC_TYPE_VIDEO;
 | 
				
			||||||
            st->codec->codec_id = CODEC_ID_4XM;
 | 
					            st->codec->codec_id = CODEC_ID_4XM;
 | 
				
			||||||
            st->codec->codec_tag = AV_RL32(&header[i + 16]);
 | 
					            st->codec->extradata_size = 4;
 | 
				
			||||||
 | 
					            st->codec->extradata = av_malloc(4);
 | 
				
			||||||
 | 
					            AV_WL32(st->codec->extradata, AV_RL32(&header[i + 16]));
 | 
				
			||||||
            st->codec->width = fourxm->width;
 | 
					            st->codec->width = fourxm->width;
 | 
				
			||||||
            st->codec->height = fourxm->height;
 | 
					            st->codec->height = fourxm->height;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user