mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-19 19:03:00 +02:00
avfilter/formats: Factor common function combinations out
Several combinations of functions happen quite often in query_format functions; e.g. ff_set_common_formats(ctx, ff_make_format_list(sample_fmts)) is very common. This commit therefore adds functions that are equivalent to commonly used function combinations in order to reduce code duplication. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -284,7 +284,7 @@ static int channelmap_query_formats(AVFilterContext *ctx)
|
||||
int ret;
|
||||
|
||||
if ((ret = ff_set_common_formats (ctx, ff_planar_sample_fmts())) < 0 ||
|
||||
(ret = ff_set_common_samplerates (ctx , ff_all_samplerates() )) < 0 ||
|
||||
(ret = ff_set_common_all_samplerates(ctx )) < 0 ||
|
||||
(ret = ff_add_channel_layout(&channel_layouts, s->output_layout)) < 0 ||
|
||||
(ret = ff_channel_layouts_ref(channel_layouts,
|
||||
&ctx->outputs[0]->incfg.channel_layouts)) < 0)
|
||||
|
||||
Reference in New Issue
Block a user