Unified · Split
| @@ -188,24 +188,6 @@ static void gate(AudioGateContext *s, · 187 unmodified lines | |||
| 188 | 188 | ||
| 189 | #if CONFIG_AGATE_FILTER | 189 | #if CONFIG_AGATE_FILTER |
| 190 | 190 | ||
| 191 | static int query_formats(AVFilterContext *ctx) | ||
| 192 | { | ||
| 193 | AVFilterFormats *formats = NULL; | ||
| 194 | int ret; | ||
| 195 | |||
| 196 | if ((ret = ff_add_format(&formats, AV_SAMPLE_FMT_DBL)) < 0) | ||
| 197 | return ret; | ||
| 198 | ret = ff_set_common_formats(ctx, formats); | ||
| 199 | if (ret < 0) | ||
| 200 | return ret; | ||
| 201 | |||
| 202 | ret = ff_set_common_all_channel_counts(ctx); | ||
| 203 | if (ret < 0) | ||
| 204 | return ret; | ||
| 205 | |||
| 206 | return ff_set_common_all_samplerates(ctx); | ||
| 207 | } | ||
| 208 | |||
| 209 | static int filter_frame(AVFilterLink *inlink, AVFrame *in) | 191 | static int filter_frame(AVFilterLink *inlink, AVFrame *in) |
| 210 | { | 192 | { |
| 211 | const double *src = (const double *)in->data[0]; | 193 | const double *src = (const double *)in->data[0]; |
| @@ -258,7 +240,7 @@ const AVFilter ff_af_agate = { · 46 unmodified lines | |||
| 258 | .priv_size = sizeof(AudioGateContext), | 240 | .priv_size = sizeof(AudioGateContext), |
| 259 | FILTER_INPUTS(inputs), | 241 | FILTER_INPUTS(inputs), |
| 260 | FILTER_OUTPUTS(outputs), | 242 | FILTER_OUTPUTS(outputs), |
| 261 | FILTER_QUERY_FUNC(query_formats), | 243 | FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBL), |
| 262 | .process_command = ff_filter_process_command, | 244 | .process_command = ff_filter_process_command, |
| 263 | .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, | 245 | .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, |
| 264 | }; | 246 | }; |