[FFmpeg-cvslog] avfilter/vf_atadenoise: do not abort if user specified invalid size

Paul B Mahol git at videolan.org
Thu Apr 26 23:34:51 EEST 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Apr 26 17:57:20 2018 +0200| [356a33b20aec0e6b3ca8c85da60e4c95b7559b35] | committer: Paul B Mahol

avfilter/vf_atadenoise: do not abort if user specified invalid size

Update documentation with new size default.

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

 doc/filters.texi            | 2 +-
 libavfilter/vf_atadenoise.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 99ebfdb318..44e0801f9c 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -5247,7 +5247,7 @@ Threshold A is designed to react on abrupt changes in the input signal and
 threshold B is designed to react on continuous changes in the input signal.
 
 @item s
-Set number of frames filter will use for averaging. Default is 33. Must be odd
+Set number of frames filter will use for averaging. Default is 9. Must be odd
 number in range [5, 129].
 
 @item p
diff --git a/libavfilter/vf_atadenoise.c b/libavfilter/vf_atadenoise.c
index 03b772c674..fcde9460ff 100644
--- a/libavfilter/vf_atadenoise.c
+++ b/libavfilter/vf_atadenoise.c
@@ -112,8 +112,8 @@ static av_cold int init(AVFilterContext *ctx)
     ATADenoiseContext *s = ctx->priv;
 
     if (!(s->size & 1)) {
-        av_log(ctx, AV_LOG_ERROR, "size %d is invalid. Must be an odd value.\n", s->size);
-        return AVERROR(EINVAL);
+        av_log(ctx, AV_LOG_WARNING, "size %d is invalid. Must be an odd value, setting it to %d.\n", s->size, s->size|1);
+        s->size |= 1;
     }
     s->mid = s->size / 2 + 1;
 



More information about the ffmpeg-cvslog mailing list