[FFmpeg-devel] [PATCH 03/10] lavfi: implement ff_all_channel_counts().
Stefano Sabatini
stefasab at gmail.com
Tue Jan 1 23:11:54 CET 2013
On date Monday 2012-12-31 18:58:00 +0100, Nicolas George encoded:
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> libavfilter/formats.c | 7 +++++++
> libavfilter/formats.h | 8 +++++++-
> 2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/libavfilter/formats.c b/libavfilter/formats.c
> index 90b61f5..0795af3 100644
> --- a/libavfilter/formats.c
> +++ b/libavfilter/formats.c
> @@ -370,6 +370,13 @@ AVFilterChannelLayouts *ff_all_channel_layouts(void)
> return ret;
> }
>
> +AVFilterChannelLayouts *ff_all_channel_counts(void)
> +{
> + AVFilterChannelLayouts *ret = av_mallocz(sizeof(*ret));
> + ret->all_layouts = ret->all_counts = 1;
possible crash if !ret
> + return ret;
> +}
> +
> #define FORMATS_REF(f, ref) \
> do { \
> *ref = f; \
> diff --git a/libavfilter/formats.h b/libavfilter/formats.h
> index 9fbed21..ec15a8d 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, i.e. { AV_CH_LAYOUT_UNKNOWN }.
> + */
> +AVFilterChannelLayouts *ff_all_channel_counts(void);
Needs to be updated.
--
FFmpeg = Faithless Fancy Multimedia Pure Erotic Genius
More information about the ffmpeg-devel
mailing list