summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 4 insertions, 0 deletions
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;