From 95af5e1c8158667066e1b39217bbf6e62cedeb4c Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Sun, 11 Jan 2009 16:11:02 +0000
Subject: [PATCH] All negative returns are errors not just -1.

Originally committed as revision 16537 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 ffmpeg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index aac071e747a..341afe59409 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -967,7 +967,7 @@ static void do_video_out(AVFormatContext *s,
             ret = avcodec_encode_video(enc,
                                        bit_buffer, bit_buffer_size,
                                        &big_picture);
-            if (ret == -1) {
+            if (ret < 0) {
                 fprintf(stderr, "Video encoding failed\n");
                 av_exit(1);
             }
-- 
GitLab