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

Instead issue a warning and make filter size odd number.
This commit is contained in:
Paul B Mahol 2020-01-01 13:11:52 +01:00
parent d7e2a2bb35
commit 7bb09e57e0

View File

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