[FFmpeg-cvslog] avconv: Simplify poll_filters() return value check

Luca Barbato git at videolan.org
Tue Jan 19 08:41:02 CET 2016


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Sat Jan  2 14:43:12 2016 +0100| [7ebf1b4adad40e2b0d88ebd5cfde821a7a0ceab2] | committer: Luca Barbato

avconv: Simplify poll_filters() return value check

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7ebf1b4adad40e2b0d88ebd5cfde821a7a0ceab2
---

 avconv.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/avconv.c b/avconv.c
index 57a3718..0410378 100644
--- a/avconv.c
+++ b/avconv.c
@@ -2556,16 +2556,12 @@ static int transcode(void)
         }
 
         ret = poll_filters();
-        if (ret < 0) {
-            if (ret == AVERROR_EOF || ret == AVERROR(EAGAIN)) {
-                continue;
-            } else {
-                char errbuf[128];
-                av_strerror(ret, errbuf, sizeof(errbuf));
+        if (ret < 0 && (ret != AVERROR_EOF || ret != AVERROR(EAGAIN))) {
+            char errbuf[128];
+            av_strerror(ret, errbuf, sizeof(errbuf));
 
-                av_log(NULL, AV_LOG_ERROR, "Error while filtering: %s\n", errbuf);
-                break;
-            }
+            av_log(NULL, AV_LOG_ERROR, "Error while filtering: %s\n", errbuf);
+            break;
         }
 
         /* dump report by using the output first video and audio streams */



More information about the ffmpeg-cvslog mailing list