Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -49,23 +49,9 @@ typedef struct ASuperCutContext { · 48 unmodified lines | |||
| 49 | int (*filter_channels)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); | 49 | int (*filter_channels)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); |
| 50 | } ASuperCutContext; | 50 | } ASuperCutContext; |
| 51 | 51 | ||
| 52 | static int query_formats(AVFilterContext *ctx) | 52 | static const enum AVSampleFormat sample_fmts[] = { |
| 53 | { | 53 | AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP, AV_SAMPLE_FMT_NONE |
| 54 | static const enum AVSampleFormat sample_fmts[] = { | 54 | }; |
| 55 | AV_SAMPLE_FMT_FLTP, | ||
| 56 | AV_SAMPLE_FMT_DBLP, | ||
| 57 | AV_SAMPLE_FMT_NONE | ||
| 58 | }; | ||
| 59 | int ret = ff_set_common_formats_from_list(ctx, sample_fmts); | ||
| 60 | if (ret < 0) | ||
| 61 | return ret; | ||
| 62 | |||
| 63 | ret = ff_set_common_all_channel_counts(ctx); | ||
| 64 | if (ret < 0) | ||
| 65 | return ret; | ||
| 66 | |||
| 67 | return ff_set_common_all_samplerates(ctx); | ||
| 68 | } | ||
| 69 | 55 | ||
| 70 | static void calc_q_factors(int n, double *q) | 56 | static void calc_q_factors(int n, double *q) |
| 71 | { | 57 | { |
| @@ -362,7 +348,7 @@ const AVFilter ff_af_asupercut = { · 290 unmodified lines | |||
| 362 | .uninit = uninit, | 348 | .uninit = uninit, |
| 363 | FILTER_INPUTS(inputs), | 349 | FILTER_INPUTS(inputs), |
| 364 | FILTER_OUTPUTS(outputs), | 350 | FILTER_OUTPUTS(outputs), |
| 365 | FILTER_QUERY_FUNC(query_formats), | 351 | FILTER_SAMPLEFMTS_ARRAY(sample_fmts), |
| 366 | .process_command = process_command, | 352 | .process_command = process_command, |
| 367 | .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | | 353 | .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | |
| 368 | AVFILTER_FLAG_SLICE_THREADS, | 354 | AVFILTER_FLAG_SLICE_THREADS, |
| @@ -385,7 +371,7 @@ const AVFilter ff_af_asubcut = { · 16 unmodified lines | |||
| 385 | .uninit = uninit, | 371 | .uninit = uninit, |
| 386 | FILTER_INPUTS(inputs), | 372 | FILTER_INPUTS(inputs), |
| 387 | FILTER_OUTPUTS(outputs), | 373 | FILTER_OUTPUTS(outputs), |
| 388 | FILTER_QUERY_FUNC(query_formats), | 374 | FILTER_SAMPLEFMTS_ARRAY(sample_fmts), |
| 389 | .process_command = process_command, | 375 | .process_command = process_command, |
| 390 | .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | | 376 | .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | |
| 391 | AVFILTER_FLAG_SLICE_THREADS, | 377 | AVFILTER_FLAG_SLICE_THREADS, |
| @@ -410,7 +396,7 @@ const AVFilter ff_af_asuperpass = { · 18 unmodified lines | |||
| 410 | .uninit = uninit, | 396 | .uninit = uninit, |
| 411 | FILTER_INPUTS(inputs), | 397 | FILTER_INPUTS(inputs), |
| 412 | FILTER_OUTPUTS(outputs), | 398 | FILTER_OUTPUTS(outputs), |
| 413 | FILTER_QUERY_FUNC(query_formats), | 399 | FILTER_SAMPLEFMTS_ARRAY(sample_fmts), |
| 414 | .process_command = process_command, | 400 | .process_command = process_command, |
| 415 | .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | | 401 | .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | |
| 416 | AVFILTER_FLAG_SLICE_THREADS, | 402 | AVFILTER_FLAG_SLICE_THREADS, |
| @@ -424,7 +410,7 @@ const AVFilter ff_af_asuperstop = { · 7 unmodified lines | |||
| 424 | .uninit = uninit, | 410 | .uninit = uninit, |
| 425 | FILTER_INPUTS(inputs), | 411 | FILTER_INPUTS(inputs), |
| 426 | FILTER_OUTPUTS(outputs), | 412 | FILTER_OUTPUTS(outputs), |
| 427 | FILTER_QUERY_FUNC(query_formats), | 413 | FILTER_SAMPLEFMTS_ARRAY(sample_fmts), |
| 428 | .process_command = process_command, | 414 | .process_command = process_command, |
| 429 | .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | | 415 | .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | |
| 430 | AVFILTER_FLAG_SLICE_THREADS, | 416 | AVFILTER_FLAG_SLICE_THREADS, |