Commit 26165f99 authored by Måns Rullgård's avatar Måns Rullgård Committed by Michael Niedermayer

improved detection of "AVC1" style H.264 patch by (Måns Rullgård <mru inprovide com>)

Originally committed as revision 4013 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent fc90504b
...@@ -2632,15 +2632,13 @@ static int decode_init(AVCodecContext *avctx){ ...@@ -2632,15 +2632,13 @@ static int decode_init(AVCodecContext *avctx){
decode_init_vlc(h); decode_init_vlc(h);
if(avctx->codec_tag != 0x31637661 && avctx->codec_tag != 0x31435641) // avc1 if(avctx->extradata_size > 0 && avctx->extradata &&
h->is_avc = 0; *(char *)avctx->extradata == 1){
else { av_log(avctx, AV_LOG_INFO, "assuming AVC1 format\n");
if((avctx->extradata_size == 0) || (avctx->extradata == NULL)) {
av_log(avctx, AV_LOG_ERROR, "AVC codec requires avcC data\n");
return -1;
}
h->is_avc = 1; h->is_avc = 1;
h->got_avcC = 0; h->got_avcC = 0;
} else {
h->is_avc = 0;
} }
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment