summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-11-01 01:59:22 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-11-01 01:59:22 +0000
commit0ac0703107c12bc78ea2853877a38a2a7384789a (patch)
treeb03b23a1d09daaa0b095717acdef5f2d6c56c460 /ffmpeg.c
parent7c032a369aea3754213d7b79e28ff0c2496b2cf4 (diff)
check av_interleaved_write_frame() return
fixes issue149 Originally committed as revision 10891 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index d5153988d7..0601fdf6b9 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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 *s, AVPacket *pkt, AVCodecContext *avctx
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)