[FFmpeg-cvslog] avfilter/af_anlmdn: try to recover when cache becomes negative

Paul B Mahol git at videolan.org
Sun Jun 2 14:03:33 EEST 2019


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Jun  2 12:58:07 2019 +0200| [1a266a1ef91d0329936ab75389102017cb48f45f] | committer: Paul B Mahol

avfilter/af_anlmdn: try to recover when cache becomes negative

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1a266a1ef91d0329936ab75389102017cb48f45f
---

 libavfilter/af_anlmdn.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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;



More information about the ffmpeg-cvslog mailing list