It copies, not moves the channel layout.
Showing the changes to libavfilter (2 of 2 files). Show all
Unified · Split
| @@ -464,7 +464,8 @@ do { \ · 463 unmodified lines | |||
| 464 | (*f)->nb++; \ | 464 | (*f)->nb++; \ |
| 465 | } while (0) | 465 | } while (0) |
| 466 | 466 | ||
| 467 | int ff_add_channel_layout(AVFilterChannelLayouts **l, AVChannelLayout *channel_layout) | 467 | int ff_add_channel_layout(AVFilterChannelLayouts **l, |
| 468 | const AVChannelLayout *channel_layout) | ||
| 468 | { | 469 | { |
| 469 | av_assert1(!(*l && (*l)->all_layouts)); | 470 | av_assert1(!(*l && (*l)->all_layouts)); |
| 470 | ADD_FORMAT(l, channel_layout, ff_channel_layouts_unref, AVChannelLayout, channel_layouts, nb_channel_layouts); | 471 | ADD_FORMAT(l, channel_layout, ff_channel_layouts_unref, AVChannelLayout, channel_layouts, nb_channel_layouts); |
| @@ -180,7 +180,8 @@ av_warn_unused_result · 179 unmodified lines | |||
| 180 | int ff_set_common_formats_from_list(AVFilterContext *ctx, const int *fmts); | 180 | int ff_set_common_formats_from_list(AVFilterContext *ctx, const int *fmts); |
| 181 | 181 | ||
| 182 | av_warn_unused_result | 182 | 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); | ||
| 184 | 185 | ||
| 185 | /** | 186 | /** |
| 186 | * Add *ref as a new reference to f. | 187 | * Add *ref as a new reference to f. |