[FFmpeg-cvslog] avfilter/af_adelay: remove requirement that at least one delay should be provided

Paul B Mahol git at videolan.org
Wed Aug 30 21:26:28 EEST 2017


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Aug 30 18:14:10 2017 +0200| [6ccd32c36760ac8b8261d68eb32b07cf5c762e52] | committer: Paul B Mahol

avfilter/af_adelay: remove requirement that at least one delay should be provided

Such requirement is not necessary and code works without it just fine.

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

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

 doc/filters.texi        | 1 -
 libavfilter/af_adelay.c | 5 -----
 2 files changed, 6 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 19e13a1346..afcb99d876 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -551,7 +551,6 @@ The filter accepts the following option:
 @table @option
 @item delays
 Set list of delays in milliseconds for each channel separated by '|'.
-At least one delay greater than 0 should be provided.
 Unused delays will be silently ignored. If number of given delays is
 smaller than number of channels all remaining channels will not be delayed.
 If you want to delay exact number of samples, append 'S' to number.
diff --git a/libavfilter/af_adelay.c b/libavfilter/af_adelay.c
index 187cacf28a..983f089c21 100644
--- a/libavfilter/af_adelay.c
+++ b/libavfilter/af_adelay.c
@@ -171,11 +171,6 @@ static int config_input(AVFilterLink *inlink)
         s->max_delay = FFMAX(s->max_delay, d->delay);
     }
 
-    if (!s->max_delay) {
-        av_log(ctx, AV_LOG_ERROR, "At least one delay >0 must be specified.\n");
-        return AVERROR(EINVAL);
-    }
-
     switch (inlink->format) {
     case AV_SAMPLE_FMT_U8P : s->delay_channel = delay_channel_u8p ; break;
     case AV_SAMPLE_FMT_S16P: s->delay_channel = delay_channel_s16p; break;



More information about the ffmpeg-cvslog mailing list