[FFmpeg-devel] [PATCH 04/10] lavfi: implement ff_query_formats_all().

Stefano Sabatini stefasab at gmail.com
Sun Jan 6 10:41:36 CET 2013


On date Saturday 2013-01-05 14:50:39 +0100, Nicolas George encoded:
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  libavfilter/formats.c |    8 ++++++++
>  libavfilter/formats.h |    8 ++++++++
>  2 files changed, 16 insertions(+)
> 
> 
> Minor fixes according to the first review.
> 
> 
> diff --git a/libavfilter/formats.c b/libavfilter/formats.c
> index 5f8954c..a1d6017 100644
> --- a/libavfilter/formats.c
> +++ b/libavfilter/formats.c
> @@ -531,6 +531,14 @@ int ff_default_query_formats(AVFilterContext *ctx)
>      return 0;
>  }
>  
> +int ff_query_formats_all(AVFilterContext *ctx)
> +{

> +    ff_set_common_formats(ctx, ff_all_formats(AVMEDIA_TYPE_AUDIO));
> +    ff_set_common_channel_layouts(ctx, ff_all_channel_counts());
> +    ff_set_common_samplerates(ctx, ff_all_samplerates());

This code could make use of an audio check (and possibly work as
default in case of video), so you get the expected result even with
video, especially considering that there is nothing in the name
suggesting that this only works with audio.
-- 
FFmpeg = Friendly Fast Monstrous Problematic Evil Glue


More information about the ffmpeg-devel mailing list