avfilter/af_stereotools: fix logic fail
authorPaul B Mahol <onemda@gmail.com>
Sun, 6 Dec 2015 09:09:09 +0000 (10:09 +0100)
committerPaul B Mahol <onemda@gmail.com>
Sun, 6 Dec 2015 09:09:09 +0000 (10:09 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/af_stereotools.c

index 00a0dde..8ab184d 100644 (file)
@@ -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);
     }