]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Make outpu_example use av_interleaved_write_frame() instead of av_write_frame().
authorbenoit <benoit@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 18 Feb 2009 11:46:14 +0000 (11:46 +0000)
committerbenoit <benoit@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 18 Feb 2009 11:46:14 +0000 (11:46 +0000)
Patch by Art Clarke (standard login name) xuggle com

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

output_example.c

index 82df06b8bff0edbdcc781d018dbe81603ba9a099..c6cd99f7b8329b165ce02babeb5fcdd848264394 100644 (file)
@@ -163,7 +163,7 @@ static void write_audio_frame(AVFormatContext *oc, AVStream *st)
     pkt.data= audio_outbuf;
 
     /* write the compressed frame in the media file */
-    if (av_write_frame(oc, &pkt) != 0) {
+    if (av_interleaved_write_frame(oc, &pkt) != 0) {
         fprintf(stderr, "Error while writing audio frame\n");
         exit(1);
     }
@@ -372,7 +372,7 @@ static void write_video_frame(AVFormatContext *oc, AVStream *st)
         pkt.data= (uint8_t *)picture;
         pkt.size= sizeof(AVPicture);
 
-        ret = av_write_frame(oc, &pkt);
+        ret = av_interleaved_write_frame(oc, &pkt);
     } else {
         /* encode the image */
         out_size = avcodec_encode_video(c, video_outbuf, video_outbuf_size, picture);
@@ -390,7 +390,7 @@ static void write_video_frame(AVFormatContext *oc, AVStream *st)
             pkt.size= out_size;
 
             /* write the compressed frame in the media file */
-            ret = av_write_frame(oc, &pkt);
+            ret = av_interleaved_write_frame(oc, &pkt);
         } else {
             ret = 0;
         }