OSDN Git Service

avconv: Simplify poll_filters() return value check
authorLuca Barbato <lu_zero@gentoo.org>
Sat, 2 Jan 2016 13:43:12 +0000 (14:43 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Mon, 4 Jan 2016 15:58:32 +0000 (16:58 +0100)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
avconv.c

index 57a3718..0410378 100644 (file)
--- 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 */