@@ -74,22 +74,24 @@ static int activate(AVFilterContext *ctx)
74
74
return ff_filter_frame (outlink , frame );
75
75
}
76
76
77
- static int query_formats (AVFilterContext * ctx )
77
+ static int query_formats (const AVFilterContext * ctx ,
78
+ AVFilterFormatsConfig * * cfg_in ,
79
+ AVFilterFormatsConfig * * cfg_out )
78
80
{
79
- SincContext * s = ctx -> priv ;
81
+ const SincContext * s = ctx -> priv ;
80
82
static const AVChannelLayout chlayouts [] = { AV_CHANNEL_LAYOUT_MONO , { 0 } };
81
83
int sample_rates [] = { s -> sample_rate , -1 };
82
84
static const enum AVSampleFormat sample_fmts [] = { AV_SAMPLE_FMT_FLT ,
83
85
AV_SAMPLE_FMT_NONE };
84
- int ret = ff_set_common_formats_from_list (ctx , sample_fmts );
86
+ int ret = ff_set_common_formats_from_list2 (ctx , cfg_in , cfg_out , sample_fmts );
85
87
if (ret < 0 )
86
88
return ret ;
87
89
88
- ret = ff_set_common_channel_layouts_from_list (ctx , chlayouts );
90
+ ret = ff_set_common_channel_layouts_from_list2 (ctx , cfg_in , cfg_out , chlayouts );
89
91
if (ret < 0 )
90
92
return ret ;
91
93
92
- return ff_set_common_samplerates_from_list (ctx , sample_rates );
94
+ return ff_set_common_samplerates_from_list2 (ctx , cfg_in , cfg_out , sample_rates );
93
95
}
94
96
95
97
static float * make_lpf (int num_taps , float Fc , float beta , float rho ,
@@ -428,5 +430,5 @@ const AVFilter ff_asrc_sinc = {
428
430
.activate = activate ,
429
431
.inputs = NULL ,
430
432
FILTER_OUTPUTS (sinc_outputs ),
431
- FILTER_QUERY_FUNC (query_formats ),
433
+ FILTER_QUERY_FUNC2 (query_formats ),
432
434
};
0 commit comments