avfilter/af_anlmdn: try to recover when cache becomes negative
authorPaul B Mahol <onemda@gmail.com>
Sun, 2 Jun 2019 10:58:07 +0000 (12:58 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sun, 2 Jun 2019 10:59:57 +0000 (12:59 +0200)
libavfilter/af_anlmdn.c

index 06e9736..5c881f6 100644 (file)
@@ -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;