[FFmpeg-cvslog] r17428 - trunk/output_example.c

benoit subversion
Wed Feb 18 12:46:15 CET 2009


Author: benoit
Date: Wed Feb 18 12:46:14 2009
New Revision: 17428

Log:
Make outpu_example use av_interleaved_write_frame() instead of av_write_frame().
Patch by Art Clarke (standard login name) xuggle com

Modified:
   trunk/output_example.c

Modified: trunk/output_example.c
==============================================================================
--- trunk/output_example.c	Wed Feb 18 10:21:29 2009	(r17427)
+++ trunk/output_example.c	Wed Feb 18 12:46:14 2009	(r17428)
@@ -163,7 +163,7 @@ static void write_audio_frame(AVFormatCo
     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(AVFormatCo
         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(AVFormatCo
             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;
         }




More information about the ffmpeg-cvslog mailing list