]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Set global header flag for every container that requires it.
authorbenoit <benoit@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 18 Feb 2009 08:42:35 +0000 (08:42 +0000)
committerbenoit <benoit@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 18 Feb 2009 08:42:35 +0000 (08:42 +0000)
Patch by Art Clarke a$(name) xuggle com

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

output_example.c

index 6cd1b34080bd3b22eec1c70b4cd081d328969391..82df06b8bff0edbdcc781d018dbe81603ba9a099 100644 (file)
@@ -224,7 +224,7 @@ static AVStream *add_video_stream(AVFormatContext *oc, int codec_id)
         c->mb_decision=2;
     }
     // some formats want stream headers to be separate
-    if(!strcmp(oc->oformat->name, "mp4") || !strcmp(oc->oformat->name, "mov") || !strcmp(oc->oformat->name, "3gp"))
+    if(oc->oformat->flags & AVFMT_GLOBALHEADER)
         c->flags |= CODEC_FLAG_GLOBAL_HEADER;
 
     return st;