summaryrefslogtreecommitdiff
path: root/libavfilter/formats.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-05-16 11:35:20 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-05-19 20:20:38 +0200
commit41a558fea06cc0a23b8d2d0dfb03ef6a25cf5100 (patch)
tree858e350dc3640ac64482aad416a3cadadbd56bd6 /libavfilter/formats.c
parent2c8f97831ad290c24f69b6d3fdaf9153830ce743 (diff)
downloadffmpeg-41a558fea06cc0a23b8d2d0dfb03ef6a25cf5100.tar.gz
avfilter/formats: Constify channel_layout in ff_add_channel_layout()
It copies, not moves the channel layout. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/formats.c')
-rw-r--r--libavfilter/formats.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index f2c474e279..e8c2888c0c 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -464,7 +464,8 @@ do { \
(*f)->nb++; \
} while (0)
-int ff_add_channel_layout(AVFilterChannelLayouts **l, AVChannelLayout *channel_layout)
+int ff_add_channel_layout(AVFilterChannelLayouts **l,
+ const AVChannelLayout *channel_layout)
{
av_assert1(!(*l && (*l)->all_layouts));
ADD_FORMAT(l, channel_layout, ff_channel_layouts_unref, AVChannelLayout, channel_layouts, nb_channel_layouts);