Commit 7bb09e57 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/af_dynaudnorm: do not error out if even filter size was given

Instead issue a warning and make filter size odd number.
parent d7e2a2bb
......@@ -110,8 +110,8 @@ static av_cold int init(AVFilterContext *ctx)
DynamicAudioNormalizerContext *s = ctx->priv;
if (!(s->filter_size & 1)) {
av_log(ctx, AV_LOG_ERROR, "filter size %d is invalid. Must be an odd value.\n", s->filter_size);
return AVERROR(EINVAL);
av_log(ctx, AV_LOG_WARNING, "filter size %d is invalid. Changing to an odd value.\n", s->filter_size);
s->filter_size |= 1;
}
return 0;
......
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