lavfi/aevalsrc: fix sample rate negotiation, after the last merge
authorStefano Sabatini <stefasab@gmail.com>
Wed, 16 May 2012 13:28:43 +0000 (15:28 +0200)
committerStefano Sabatini <stefasab@gmail.com>
Wed, 16 May 2012 13:28:43 +0000 (15:28 +0200)
Fix crash.

libavfilter/asrc_aevalsrc.c

index 2078d7f..db6c205 100644 (file)
@@ -187,9 +187,11 @@ static int query_formats(AVFilterContext *ctx)
     EvalContext *eval = ctx->priv;
     enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_NONE };
     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));
     ff_set_common_channel_layouts(ctx, avfilter_make_format64_list(chlayouts));
+    ff_set_common_samplerates(ctx, avfilter_make_format_list(sample_rates));
 
     return 0;
 }