summaryrefslogtreecommitdiff
path: root/libavfilter/f_sendcmd.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-08-03 00:59:02 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-08-07 09:21:13 +0200
commit50ea7389ecae321ea6c4c585b8f721b84bd64a1d (patch)
tree87f92b2b059f2ca17392f5dceca05c14d1859934 /libavfilter/f_sendcmd.c
parent6b82f35041fd3229f056e9b8644e8a91d0e0bc19 (diff)
avfilter: Deduplicate default audio inputs/outputs
Lots of audio filters use very simple inputs or outputs: An array with a single AVFilterPad whose name is "default" and whose type is AVMEDIA_TYPE_AUDIO; everything else is unset. Given that we never use pointer equality for inputs or outputs*, we can simply use a single AVFilterPad instead of dozens; this even saves .data.rel.ro (4784B here) as well as relocations. *: In fact, several filters (like the filters in af_biquads.c) already use the same inputs; furthermore, ff_filter_alloc() duplicates the input and output pads so that we do not even work with the pads directly. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/f_sendcmd.c')
-rw-r--r--libavfilter/f_sendcmd.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c
index eb49f8baba..9f27fbde14 100644
--- a/libavfilter/f_sendcmd.c
+++ b/libavfilter/f_sendcmd.c
@@ -631,13 +631,6 @@ static const AVFilterPad asendcmd_inputs[] = {
},
};
-static const AVFilterPad asendcmd_outputs[] = {
- {
- .name = "default",
- .type = AVMEDIA_TYPE_AUDIO,
- },
-};
-
const AVFilter ff_af_asendcmd = {
.name = "asendcmd",
.description = NULL_IF_CONFIG_SMALL("Send commands to filters."),
@@ -647,7 +640,7 @@ const AVFilter ff_af_asendcmd = {
.priv_size = sizeof(SendCmdContext),
.flags = AVFILTER_FLAG_METADATA_ONLY,
FILTER_INPUTS(asendcmd_inputs),
- FILTER_OUTPUTS(asendcmd_outputs),
+ FILTER_OUTPUTS(ff_audio_default_filterpad),
};
#endif