History

avfilter/formats: Constify channel_layout in ff_add_channel_layout()

It copies, not moves the channel layout.

Andreas Rheinhardt committed 4 years ago

Commit 41a558f1 parent 2c8f9782 files · +4 −2Browse files

Unified · Split

2 files
  1. libavfilter/formats.c +2 −1
  2. libavfilter/formats.h +2 −1
libavfilter/formats.c+2−1
@@ -464,7 +464,8 @@ do { \ · 463 unmodified lines
464464 (*f)->nb++; \
465465 } while (0)
466466
467−int ff_add_channel_layout(AVFilterChannelLayouts **l, AVChannelLayout *channel_layout)
467+int ff_add_channel_layout(AVFilterChannelLayouts **l,
468+ const AVChannelLayout *channel_layout)
468469 {
469470 av_assert1(!(*l && (*l)->all_layouts));
470471 ADD_FORMAT(l, channel_layout, ff_channel_layouts_unref, AVChannelLayout, channel_layouts, nb_channel_layouts);
libavfilter/formats.h+2−1
@@ -180,7 +180,8 @@ av_warn_unused_result · 179 unmodified lines
180180 int ff_set_common_formats_from_list(AVFilterContext *ctx, const int *fmts);
181181
182182 av_warn_unused_result
183−int ff_add_channel_layout(AVFilterChannelLayouts **l, AVChannelLayout *channel_layout);
183+int ff_add_channel_layout(AVFilterChannelLayouts **l,
184+ const AVChannelLayout *channel_layout);
184185
185186 /**
186187 * Add *ref as a new reference to f.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t