[FFmpeg-cvslog] r17177 - trunk/libavformat/utils.c

benoit subversion
Thu Feb 12 09:10:43 CET 2009


Author: benoit
Date: Thu Feb 12 09:10:43 2009
New Revision: 17177

Log:
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

Modified:
   trunk/libavformat/utils.c

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	Thu Feb 12 06:32:40 2009	(r17176)
+++ trunk/libavformat/utils.c	Thu Feb 12 09:10:43 2009	(r17177)
@@ -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) {




More information about the ffmpeg-cvslog mailing list