Mercurial > libavformat.hg
changeset 4462:f6b8d1584348 libavformat
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
author | benoit |
---|---|
date | Thu, 12 Feb 2009 08:10:43 +0000 |
parents | f21c01140f2d |
children | 0cd7acf426f3 |
files | utils.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Thu Feb 12 05:32:40 2009 +0000 +++ b/utils.c Thu Feb 12 08:10:43 2009 +0000 @@ -2446,6 +2446,10 @@ }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) {