summaryrefslogtreecommitdiff
path: root/libavfilter/avf_concat.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-17 05:48:27 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-17 19:13:16 +0200
commit1aa640c7d785c39e0e19407521132d77b594e654 (patch)
treecd0e2657493e2c80f11c056b630cd3bb52674452 /libavfilter/avf_concat.c
parent90550856e5182487bdfbb0527110e4b94ac5ec0f (diff)
downloadffmpeg-1aa640c7d785c39e0e19407521132d77b594e654.tar.gz
avfilter/internal: Combine get_(audio|video)_buffer into union
These fields are mutually exclusive, so putting them in a union is possible and makes AVFilterPad smaller. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/avf_concat.c')
-rw-r--r--libavfilter/avf_concat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c
index 333a0b090c..5f4e2f74df 100644
--- a/libavfilter/avf_concat.c
+++ b/libavfilter/avf_concat.c
@@ -313,9 +313,11 @@ static av_cold int init(AVFilterContext *ctx)
for (str = 0; str < cat->nb_streams[type]; str++) {
AVFilterPad pad = {
.type = type,
- .get_video_buffer = get_video_buffer,
- .get_audio_buffer = get_audio_buffer,
};
+ if (type == AVMEDIA_TYPE_VIDEO)
+ pad.get_buffer.video = get_video_buffer;
+ else
+ pad.get_buffer.audio = get_audio_buffer;
pad.name = av_asprintf("in%d:%c%d", seg, "va"[type], str);
if ((ret = ff_insert_inpad(ctx, ctx->nb_inputs, &pad)) < 0) {
av_freep(&pad.name);