From 4156a436e37fb387da60fd919d6efa8ee71e1a0f Mon Sep 17 00:00:00 2001 From: Panagiotis Issaris Date: Tue, 26 Sep 2006 14:04:36 +0000 Subject: Handle possible failure of ff_eval. Originally committed as revision 6338 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffmpeg.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ffmpeg.c') diff --git a/ffmpeg.c b/ffmpeg.c index d2a169b1a7..dc8673fd5c 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -827,6 +827,10 @@ static void do_video_out(AVFormatContext *s, ret = avcodec_encode_video(enc, bit_buffer, bit_buffer_size, &big_picture); + if (ret == -1) { + fprintf(stderr, "Video encoding failed\n"); + exit(1); + } //enc->frame_number = enc->real_pict_num; if(ret>0){ pkt.data= bit_buffer; -- cgit v1.2.3