mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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@gmail.com>
This commit is contained in:
parent
2b7da70a70
commit
6ccd32c367
@ -551,7 +551,6 @@ The filter accepts the following option:
|
|||||||
@table @option
|
@table @option
|
||||||
@item delays
|
@item delays
|
||||||
Set list of delays in milliseconds for each channel separated by '|'.
|
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
|
Unused delays will be silently ignored. If number of given delays is
|
||||||
smaller than number of channels all remaining channels will not be delayed.
|
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.
|
If you want to delay exact number of samples, append 'S' to number.
|
||||||
|
@ -171,11 +171,6 @@ static int config_input(AVFilterLink *inlink)
|
|||||||
s->max_delay = FFMAX(s->max_delay, d->delay);
|
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) {
|
switch (inlink->format) {
|
||||||
case AV_SAMPLE_FMT_U8P : s->delay_channel = delay_channel_u8p ; break;
|
case AV_SAMPLE_FMT_U8P : s->delay_channel = delay_channel_u8p ; break;
|
||||||
case AV_SAMPLE_FMT_S16P: s->delay_channel = delay_channel_s16p; break;
|
case AV_SAMPLE_FMT_S16P: s->delay_channel = delay_channel_s16p; break;
|
||||||
|
Loading…
Reference in New Issue
Block a user