Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-05-17 18:31:52 +0400
committerClément Bœsch <ubitux@gmail.com>2012-05-17 18:31:54 +0400
commit5dbd66395acc4ea85a3dd311f93f988a1c6021e8 (patch)
tree10449415e51f7452b71dd7831bfbfc1511fe16d0 /libavfilter/af_pan.c
parent1bca73cf1850f2ca3c438ad3a4cec548f3d4f72e (diff)
lavfi/pan: add supported sample rates to avoid a crash.
Diffstat (limited to 'libavfilter/af_pan.c')
-rw-r--r--libavfilter/af_pan.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c
index 49f8677b90..d8c4116a07 100644
--- a/libavfilter/af_pan.c
+++ b/libavfilter/af_pan.c
@@ -213,12 +213,18 @@ static int query_formats(AVFilterContext *ctx)
PanContext *pan = ctx->priv;
AVFilterLink *inlink = ctx->inputs[0];
AVFilterLink *outlink = ctx->outputs[0];
+ AVFilterFormats *formats = NULL;
AVFilterChannelLayouts *layouts;
pan->pure_gains = are_gains_pure(pan);
/* libswr supports any sample and packing formats */
avfilter_set_common_sample_formats(ctx, avfilter_make_all_formats(AVMEDIA_TYPE_AUDIO));
+ formats = ff_all_samplerates();
+ if (!formats)
+ return AVERROR(ENOMEM);
+ ff_set_common_samplerates(ctx, formats);
+
// inlink supports any channel layout
layouts = ff_all_channel_layouts();
ff_channel_layouts_ref(layouts, &inlink->out_channel_layouts);