diff options
author | Art Clarke <aclarke@vlideshow.com> | 2009-02-12 08:10:43 +0000 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2009-02-12 08:10:43 +0000 |
commit | d5cce0a434294121adf970f162b26081b1c521b2 (patch) | |
tree | eacecf76db3053d1ab1eafd010f8f204fd5f692f /libavformat | |
parent | 6f0b1866996097be25efc113fdc660f11886871e (diff) | |
download | ffmpeg-d5cce0a434294121adf970f162b26081b1c521b2.tar.gz |
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
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 7e8398be12..d2e141a5af 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2446,6 +2446,10 @@ int av_write_header(AVFormatContext *s) }else 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) { |