]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blobdiff - output_example.c
Set global header flag for every container that requires it.
[frescor/ffmpeg.git] / 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;