summaryrefslogtreecommitdiff
path: root/libavfilter/af_stereotools.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2015-12-06 10:09:09 +0100
committerPaul B Mahol <onemda@gmail.com>2015-12-06 10:09:09 +0100
commit3e1724baf8aaf8bd591acd44f260e9d69cf94fdc (patch)
treeaa45597a7b67d8e9137e0d921fe03ffd978f88fa /libavfilter/af_stereotools.c
parent21c34cb26154a5eadd6e10df86c20e2df3a7bd55 (diff)
downloadffmpeg-3e1724baf8aaf8bd591acd44f260e9d69cf94fdc.tar.gz
avfilter/af_stereotools: fix logic fail
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/af_stereotools.c')
-rw-r--r--libavfilter/af_stereotools.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/af_stereotools.c b/libavfilter/af_stereotools.c
index 00a0dde281..8ab184df11 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);
}