]> git.sesse.net Git - ffmpeg/blobdiff - output_example.c
make sure the mpeg audio header is valid before passing it to ff_mpegaudio_decode_hea...
[ffmpeg] / output_example.c
index ee123fdcd4533a9afa12aef5eb6ee43b6bee5bf4..cb631d599d84a6fe065214d6474ad4c08ef3c7ef 100644 (file)
@@ -34,6 +34,8 @@
 #include "avformat.h"
 #include "swscale.h"
 
+#undef exit
+
 /* 5 seconds stream duration */
 #define STREAM_DURATION   5.0
 #define STREAM_FRAME_RATE 25 /* 25 images/s */
@@ -215,12 +217,12 @@ static AVStream *add_video_stream(AVFormatContext *oc, int codec_id)
         c->max_b_frames = 2;
     }
     if (c->codec_id == CODEC_ID_MPEG1VIDEO){
-        /* needed to avoid using macroblocks in which some coeffs overflow
-           this doesnt happen with normal video, it just happens here as the
-           motion of the chroma plane doesnt match the luma plane */
+        /* Needed to avoid using macroblocks in which some coeffs overflow.
+           This does not happen with normal video, it just happens here as
+           the motion of the chroma plane does not match the luma plane. */
         c->mb_decision=2;
     }
-    // some formats want stream headers to be seperate
+    // some formats want stream headers to be separate
     if(!strcmp(oc->oformat->name, "mp4") || !strcmp(oc->oformat->name, "mov") || !strcmp(oc->oformat->name, "3gp"))
         c->flags |= CODEC_FLAG_GLOBAL_HEADER;