af_amix: only consider negative return codes as errors.
authorAnton Khirnov <anton@khirnov.net>
Wed, 4 Jul 2012 16:55:14 +0000 (18:55 +0200)
committerAnton Khirnov <anton@khirnov.net>
Fri, 6 Jul 2012 11:51:58 +0000 (13:51 +0200)
libavfilter/af_amix.c

index 8ceb179..a8ec8a1 100644 (file)
@@ -360,7 +360,7 @@ static int request_samples(AVFilterContext *ctx, int min_samples)
                 s->input_state[i] = INPUT_OFF;
                 continue;
             }
-        } else if (ret)
+        } else if (ret < 0)
             return ret;
     }
     return 0;
@@ -422,7 +422,7 @@ static int request_frame(AVFilterLink *outlink)
                 return AVERROR_EOF;
             else
                 return AVERROR(EAGAIN);
-        } else if (ret)
+        } else if (ret < 0)
             return ret;
     }
     av_assert0(s->frame_list->nb_frames > 0);