diff options
-rw-r--r-- | libavfilter/af_anlmdn.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; |