diff options
author | Marton Balint <cus@passwd.hu> | 2021-07-28 23:53:42 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2021-11-14 18:13:58 +0100 |
commit | 0a9edac48eacc0f914f489dc7953a51bf24bb99c (patch) | |
tree | c18e100fc7505a5aa3bda1c3add80c8474d80a00 /doc | |
parent | 97c3053d59f30f84b30efcc73ccf1b2e84b89006 (diff) | |
download | ffmpeg-0a9edac48eacc0f914f489dc7953a51bf24bb99c.tar.gz |
avfilter/af_apad: do not add infinite silence for zero pad_dur or whole_dur
Unfortunately pad_len and pad_dur behaviour was different if 0 was specified,
pad_dur handled 0 duration as infinity, for pad_len, infinity was -1.
Let's make the behaviour consistent by handling 0 duration for pad_dur and
whole_dur as indeed 0 duration. This somewhat changes the behaviour of the
filter if 0 was explicitly specified, but deprecating the old option and adding
a new for the corrected behaviour seemed a bit overkill. So let's document the
change instead.
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/filters.texi | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/filters.texi b/doc/filters.texi index 6ab41706e5..1fced203b6 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -2291,12 +2291,12 @@ with @option{pad_len}. @item pad_dur Specify the duration of samples of silence to add. See @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils} -for the accepted syntax. Used only if set to non-zero value. +for the accepted syntax. Used only if set to non-negative value. @item whole_dur Specify the minimum total duration in the output audio stream. See @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils} -for the accepted syntax. Used only if set to non-zero value. If the value is longer than +for the accepted syntax. Used only if set to non-negative value. If the value is longer than the input audio length, silence is added to the end, until the value is reached. This option is mutually exclusive with @option{pad_dur} @end table @@ -2305,6 +2305,9 @@ If neither the @option{pad_len} nor the @option{whole_len} nor @option{pad_dur} nor @option{whole_dur} option is set, the filter will add silence to the end of the input stream indefinitely. +Note that for ffmpeg 4.4 and earlier a zero @option{pad_dur} or +@option{whole_dur} also caused the filter to add silence indefinitely. + @subsection Examples @itemize |