[libav-commits] af_amix: only consider negative return codes as errors.

Anton Khirnov git at libav.org
Fri Jul 6 14:42:26 CEST 2012


Module: libav
Branch: master
Commit: 428b369804d1a0ea7212409e800324ce284e9d55

Author:    Anton Khirnov <anton at khirnov.net>
Committer: Anton Khirnov <anton at khirnov.net>
Date:      Wed Jul  4 18:55:14 2012 +0200

af_amix: only consider negative return codes as errors.

---

 libavfilter/af_amix.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index 8ceb179..a8ec8a1 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -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);



More information about the libav-commits mailing list