summaryrefslogtreecommitdiff
path: root/output_example.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-01-06 21:03:41 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-01-06 21:03:41 +0000
commitaf547ce5a4a0db8640adb7969156d33bc248c6b6 (patch)
tree2e68596a006a9501f038fe47bddb78b4593e0139 /output_example.c
parentd13431cd565e37e7e93667c18d78649cd538b237 (diff)
fix assertion failure when writing mov files
Originally committed as revision 2673 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'output_example.c')
-rw-r--r--output_example.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/output_example.c b/output_example.c
index ca47a888f1..8f3dcd6928 100644
--- a/output_example.c
+++ b/output_example.c
@@ -24,6 +24,7 @@
*/
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <math.h>
#ifndef M_PI
@@ -201,6 +202,10 @@ AVStream *add_video_stream(AVFormatContext *oc, int codec_id)
/* just for testing, we also add B frames */
c->max_b_frames = 2;
}
+ // some formats want stream headers to be seperate
+ if(!strcmp(oc->oformat->name, "mp4") || !strcmp(oc->oformat->name, "mov") || !strcmp(oc->oformat->name, "3gp"))
+ c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+
return st;
}