diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-06-02 12:58:07 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-06-02 12:59:57 +0200 |
commit | 1a266a1ef91d0329936ab75389102017cb48f45f (patch) | |
tree | 30975d4defae4c4ac99722ed0b0fd0f29bc259d9 /libavfilter | |
parent | b5355774652cfbef3fd3f2c77d1403661e5222a5 (diff) | |
download | ffmpeg-1a266a1ef91d0329936ab75389102017cb48f45f.tar.gz |
avfilter/af_anlmdn: try to recover when cache becomes negative
Diffstat (limited to 'libavfilter')
-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; |