[FFmpeg-devel] [PATCH 03/10] lavfi: implement ff_all_channel_counts().

Stefano Sabatini stefasab at gmail.com
Fri Jan 18 01:03:22 CET 2013


On date Wednesday 2013-01-16 17:50:17 +0100, Nicolas George encoded:
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  libavfilter/formats.c |    9 +++++++++
>  libavfilter/formats.h |    8 +++++++-
>  2 files changed, 16 insertions(+), 1 deletion(-)
> 
> 
> Approved, unchanged.
> 
> 
> diff --git a/libavfilter/formats.c b/libavfilter/formats.c
> index 296e4f4..5f8954c 100644
> --- a/libavfilter/formats.c
> +++ b/libavfilter/formats.c
> @@ -376,6 +376,15 @@ AVFilterChannelLayouts *ff_all_channel_layouts(void)
>      return ret;
>  }
>  
> +AVFilterChannelLayouts *ff_all_channel_counts(void)
> +{
> +    AVFilterChannelLayouts *ret = av_mallocz(sizeof(*ret));
> +    if (!ret)
> +        return NULL;
> +    ret->all_layouts = ret->all_counts = 1;
> +    return ret;
> +}
> +
>  #define FORMATS_REF(f, ref)                                          \
>  do {                                                                 \
>      *ref = f;                                                        \
> diff --git a/libavfilter/formats.h b/libavfilter/formats.h
> index dd52ec8..c6ace3a 100644
> --- a/libavfilter/formats.h
> +++ b/libavfilter/formats.h
> @@ -123,11 +123,17 @@ AVFilterFormats *ff_merge_samplerates(AVFilterFormats *a,
>  
>  /**
>   * Construct an empty AVFilterChannelLayouts/AVFilterFormats struct --
> - * representing any channel layout/sample rate.
> + * representing any channel layout (with known disposition)/sample rate.
>   */
>  AVFilterChannelLayouts *ff_all_channel_layouts(void);
>  AVFilterFormats *ff_all_samplerates(void);
>  
> +/**
> + * Construct an AVFilterChannelLayouts coding for any channel layout, with
> + * disposition known or unknown.

nit: "known or unknown disposition" reads better to this non-native
brain.

[...]

Still LGTM, thanks.
-- 
FFmpeg = Freak Fast Most Ponderous Ecstatic Geisha


More information about the ffmpeg-devel mailing list