[FFmpeg-devel] [PATCH 4/4] lavfi: remove init and check of rate and layout.

Stefano Sabatini stefasab at gmail.com
Thu Dec 20 01:01:21 CET 2012


On date Sunday 2012-12-02 18:39:13 +0100, Nicolas George encoded:
> The sample rate and channel layout are negociated and set

negotiated

> by the filter graph system.
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  libavfilter/avfilter.c |    9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
> index 392e32d..08e33a8 100644
> --- a/libavfilter/avfilter.c
> +++ b/libavfilter/avfilter.c
> @@ -281,17 +281,8 @@ int avfilter_config_links(AVFilterContext *filter)
>  
>              case AVMEDIA_TYPE_AUDIO:
>                  if (inlink) {
> -                    if (!link->sample_rate)
> -                        link->sample_rate = inlink->sample_rate;
>                      if (!link->time_base.num && !link->time_base.den)
>                          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);
>                  }

OK, I see that this is a relics of when sample_rate and channel_layout
were set directly in init/config_props, should be OK as long as FATE
is happy with it, thanks.
-- 
FFmpeg = Foolish and Fanciful Martial Picky Exploitable Gadget


More information about the ffmpeg-devel mailing list