[FFmpeg-cvslog] r10891 - trunk/ffmpeg.c

michael subversion
Thu Nov 1 02:59:23 CET 2007


Author: michael
Date: Thu Nov  1 02:59:22 2007
New Revision: 10891

Log:
check av_interleaved_write_frame() return
fixes issue149


Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	(original)
+++ trunk/ffmpeg.c	Thu Nov  1 02:59:22 2007
@@ -409,6 +409,8 @@ get_sync_ipts(const AVOutputStream *ost)
 }
 
 static void write_frame(AVFormatContext *s, AVPacket *pkt, AVCodecContext *avctx, AVBitStreamFilterContext *bsfc){
+    int ret;
+
     while(bsfc){
         AVPacket new_pkt= *pkt;
         int a= av_bitstream_filter_filter(bsfc, avctx, NULL,
@@ -424,7 +426,11 @@ static void write_frame(AVFormatContext 
         bsfc= bsfc->next;
     }
 
-    av_interleaved_write_frame(s, pkt);
+    ret= av_interleaved_write_frame(s, pkt);
+    if(ret < 0){
+        print_error("av_interleaved_write_frame()", ret);
+        exit(1);
+    }
 }
 
 #define MAX_AUDIO_PACKET_SIZE (128 * 1024)




More information about the ffmpeg-cvslog mailing list