From 1a266a1ef91d0329936ab75389102017cb48f45f Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 2 Jun 2019 12:58:07 +0200 Subject: avfilter/af_anlmdn: try to recover when cache becomes negative --- libavfilter/af_anlmdn.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libavfilter') diff --git a/libavfilter/af_anlmdn.c b/libavfilter/af_anlmdn.c index 06e9736cc2..5c881f6fd2 100644 --- a/libavfilter/af_anlmdn.c +++ b/libavfilter/af_anlmdn.c @@ -224,7 +224,10 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int ch, int nb_jobs) unsigned weight_lut_idx; float w; - av_assert2(distance >= 0.f); + if (distance < 0.f) { + cache[j] = 0.f; + continue; + } w = distance * sw; if (w >= smooth) continue; -- cgit v1.2.3