diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-05-06 09:00:22 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-05-14 23:36:10 +0400 |
commit | ff1f51a8aa624753aaec76d8f836cd3c92d91fed (patch) | |
tree | 72db802d5ba0d0bc5a80a20668e729eadb3f97d0 /libavfilter/af_resample.c | |
parent | 5775a1832c4165e6acc1d307004b38701bb463f4 (diff) |
lavfi: add channel layout/sample rate negotiation.
Diffstat (limited to 'libavfilter/af_resample.c')
-rw-r--r-- | libavfilter/af_resample.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavfilter/af_resample.c b/libavfilter/af_resample.c index f46e24b1b6..4ad5a8c38e 100644 --- a/libavfilter/af_resample.c +++ b/libavfilter/af_resample.c @@ -31,6 +31,7 @@ #include "audio.h" #include "avfilter.h" +#include "formats.h" #include "internal.h" typedef struct ResampleContext { @@ -56,10 +57,20 @@ static int query_formats(AVFilterContext *ctx) AVFilterFormats *in_formats = avfilter_all_formats(AVMEDIA_TYPE_AUDIO); AVFilterFormats *out_formats = avfilter_all_formats(AVMEDIA_TYPE_AUDIO); + AVFilterFormats *in_samplerates = ff_all_samplerates(); + AVFilterFormats *out_samplerates = ff_all_samplerates(); + AVFilterChannelLayouts *in_layouts = ff_all_channel_layouts(); + AVFilterChannelLayouts *out_layouts = ff_all_channel_layouts(); avfilter_formats_ref(in_formats, &inlink->out_formats); avfilter_formats_ref(out_formats, &outlink->in_formats); + avfilter_formats_ref(in_samplerates, &inlink->out_samplerates); + avfilter_formats_ref(out_samplerates, &outlink->in_samplerates); + + ff_channel_layouts_ref(in_layouts, &inlink->out_channel_layouts); + ff_channel_layouts_ref(out_layouts, &outlink->in_channel_layouts); + return 0; } |