1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavfi/aevalsrc: fix sample rate negotiation, after the last merge

Fix crash.
This commit is contained in:
Stefano Sabatini 2012-05-16 15:28:43 +02:00
parent e109e392ba
commit 986d2f6ec0

View File

@ -187,9 +187,11 @@ static int query_formats(AVFilterContext *ctx)
EvalContext *eval = ctx->priv; EvalContext *eval = ctx->priv;
enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_NONE }; enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_NONE };
int64_t chlayouts[] = { eval->chlayout, -1 }; int64_t chlayouts[] = { eval->chlayout, -1 };
int sample_rates[] = { eval->sample_rate, -1 };
avfilter_set_common_sample_formats (ctx, avfilter_make_format_list(sample_fmts)); avfilter_set_common_sample_formats (ctx, avfilter_make_format_list(sample_fmts));
ff_set_common_channel_layouts(ctx, avfilter_make_format64_list(chlayouts)); ff_set_common_channel_layouts(ctx, avfilter_make_format64_list(chlayouts));
ff_set_common_samplerates(ctx, avfilter_make_format_list(sample_rates));
return 0; return 0;
} }