mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
lavfi: remove init and check of rate and layout.
The sample rate and channel layout are negotiated and set by the filter graph system.
This commit is contained in:
parent
5033a1af17
commit
0146c1f0f1
@ -281,17 +281,8 @@ int avfilter_config_links(AVFilterContext *filter)
|
|||||||
|
|
||||||
case AVMEDIA_TYPE_AUDIO:
|
case AVMEDIA_TYPE_AUDIO:
|
||||||
if (inlink) {
|
if (inlink) {
|
||||||
if (!link->sample_rate)
|
|
||||||
link->sample_rate = inlink->sample_rate;
|
|
||||||
if (!link->time_base.num && !link->time_base.den)
|
if (!link->time_base.num && !link->time_base.den)
|
||||||
link->time_base = inlink->time_base;
|
link->time_base = inlink->time_base;
|
||||||
if (!link->channel_layout)
|
|
||||||
link->channel_layout = inlink->channel_layout;
|
|
||||||
} else if (!link->sample_rate) {
|
|
||||||
av_log(link->src, AV_LOG_ERROR,
|
|
||||||
"Audio source filters must set their output link's "
|
|
||||||
"sample_rate\n");
|
|
||||||
return AVERROR(EINVAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!link->time_base.num && !link->time_base.den)
|
if (!link->time_base.num && !link->time_base.den)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user