[FFmpeg-cvslog] avfilter/af_stereotools: fix logic fail

Paul B Mahol git at videolan.org
Sun Dec 6 10:10:07 CET 2015


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Dec  6 10:09:09 2015 +0100| [3e1724baf8aaf8bd591acd44f260e9d69cf94fdc] | committer: Paul B Mahol

avfilter/af_stereotools: fix logic fail

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

 libavfilter/af_stereotools.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_stereotools.c b/libavfilter/af_stereotools.c
index 00a0dde..8ab184d 100644
--- a/libavfilter/af_stereotools.c
+++ b/libavfilter/af_stereotools.c
@@ -110,7 +110,7 @@ static int config_input(AVFilterLink *inlink)
     StereoToolsContext *s = ctx->priv;
 
     s->length = 2 * inlink->sample_rate * 0.05;
-    if (s->length <= 1 && s->length & 1) {
+    if (s->length <= 1 || s->length & 1) {
         av_log(ctx, AV_LOG_ERROR, "sample rate is too small\n");
         return AVERROR(EINVAL);
     }



More information about the ffmpeg-cvslog mailing list