mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-18 21:45:10 +00:00
avfilter/af_asetrate: extend query_formats()
It left some formats not defined. Causing format negotiation errors with ffplay. Fixes #9248
This commit is contained in:
parent
ee6ef66d65
commit
e076d8a9b3
@ -49,7 +49,17 @@ AVFILTER_DEFINE_CLASS(asetrate);
|
||||
static av_cold int query_formats(AVFilterContext *ctx)
|
||||
{
|
||||
ASetRateContext *sr = ctx->priv;
|
||||
int sample_rates[] = { sr->sample_rate, -1 };
|
||||
int ret, sample_rates[] = { sr->sample_rate, -1 };
|
||||
|
||||
if ((ret = ff_set_common_formats(ctx, ff_all_formats(AVMEDIA_TYPE_AUDIO))) < 0)
|
||||
return ret;
|
||||
|
||||
if ((ret = ff_set_common_all_channel_counts(ctx)) < 0)
|
||||
return ret;
|
||||
|
||||
if ((ret = ff_formats_ref(ff_all_samplerates(),
|
||||
&ctx->inputs[0]->outcfg.samplerates)) < 0)
|
||||
return ret;
|
||||
|
||||
return ff_formats_ref(ff_make_format_list(sample_rates),
|
||||
&ctx->outputs[0]->incfg.samplerates);
|
||||
|
Loading…
Reference in New Issue
Block a user