Commit d5cce0a4 authored by Art Clarke's avatar Art Clarke Committed by Benoit Fouet

Add a warning log when trying to encode into a container requiring global

headers in extradata and the codec is not set correctly.
Patch by Art Clarke aclarke xuggle com

Originally committed as revision 17177 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 6f0b1866
...@@ -2446,6 +2446,10 @@ int av_write_header(AVFormatContext *s) ...@@ -2446,6 +2446,10 @@ int av_write_header(AVFormatContext *s)
}else }else
st->codec->codec_tag= av_codec_get_tag(s->oformat->codec_tag, st->codec->codec_id); st->codec->codec_tag= av_codec_get_tag(s->oformat->codec_tag, st->codec->codec_id);
} }
if(s->oformat->flags & AVFMT_GLOBALHEADER &&
!(st->codec->flags & CODEC_FLAG_GLOBAL_HEADER))
av_log(s, AV_LOG_WARNING, "Codec for stream %d does not use global headers but container format requires global headers\n", i);
} }
if (!s->priv_data && s->oformat->priv_data_size > 0) { if (!s->priv_data && s->oformat->priv_data_size > 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