Commit 3e1724ba authored by Paul B Mahol's avatar Paul B Mahol

avfilter/af_stereotools: fix logic fail

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 21c34cb2
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment