1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avfilter/vf_aspect: Deduplicate inputs

Also avoid using the avfilter-prefix for static objects.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2023-11-01 08:39:58 +01:00
parent a40f833bac
commit 1d33a310df

View File

@ -127,6 +127,14 @@ static int get_aspect_ratio(AVFilterLink *inlink, AVRational *aspect_ratio)
return 0; return 0;
} }
static const AVFilterPad aspect_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.filter_frame = filter_frame,
},
};
#if CONFIG_SETDAR_FILTER #if CONFIG_SETDAR_FILTER
static int setdar_config_props(AVFilterLink *outlink) static int setdar_config_props(AVFilterLink *outlink)
@ -171,14 +179,6 @@ static const AVOption setdar_options[] = {
AVFILTER_DEFINE_CLASS(setdar); AVFILTER_DEFINE_CLASS(setdar);
static const AVFilterPad avfilter_vf_setdar_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.filter_frame = filter_frame,
},
};
static const AVFilterPad avfilter_vf_setdar_outputs[] = { static const AVFilterPad avfilter_vf_setdar_outputs[] = {
{ {
.name = "default", .name = "default",
@ -193,7 +193,7 @@ const AVFilter ff_vf_setdar = {
.priv_size = sizeof(AspectContext), .priv_size = sizeof(AspectContext),
.priv_class = &setdar_class, .priv_class = &setdar_class,
.flags = AVFILTER_FLAG_METADATA_ONLY, .flags = AVFILTER_FLAG_METADATA_ONLY,
FILTER_INPUTS(avfilter_vf_setdar_inputs), FILTER_INPUTS(aspect_inputs),
FILTER_OUTPUTS(avfilter_vf_setdar_outputs), FILTER_OUTPUTS(avfilter_vf_setdar_outputs),
}; };
@ -234,14 +234,6 @@ static const AVOption setsar_options[] = {
AVFILTER_DEFINE_CLASS(setsar); AVFILTER_DEFINE_CLASS(setsar);
static const AVFilterPad avfilter_vf_setsar_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.filter_frame = filter_frame,
},
};
static const AVFilterPad avfilter_vf_setsar_outputs[] = { static const AVFilterPad avfilter_vf_setsar_outputs[] = {
{ {
.name = "default", .name = "default",
@ -256,7 +248,7 @@ const AVFilter ff_vf_setsar = {
.priv_size = sizeof(AspectContext), .priv_size = sizeof(AspectContext),
.priv_class = &setsar_class, .priv_class = &setsar_class,
.flags = AVFILTER_FLAG_METADATA_ONLY, .flags = AVFILTER_FLAG_METADATA_ONLY,
FILTER_INPUTS(avfilter_vf_setsar_inputs), FILTER_INPUTS(aspect_inputs),
FILTER_OUTPUTS(avfilter_vf_setsar_outputs), FILTER_OUTPUTS(avfilter_vf_setsar_outputs),
}; };