]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Add a warning log when trying to encode into a container requiring global
authorbenoit <benoit@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 12 Feb 2009 08:10:43 +0000 (08:10 +0000)
committerbenoit <benoit@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 12 Feb 2009 08:10:43 +0000 (08:10 +0000)
headers in extradata and the codec is not set correctly.
Patch by Art Clarke aclarke xuggle com

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17177 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/utils.c

index 7e8398be12c9b9bc8293e39e9d91da6bc1eb4f66..d2e141a5af9cb5ed658d8c294436dc2c77c69be1 100644 (file)
@@ -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) {