Function av_channel_layout_custom_init

Source
pub unsafe extern "C" fn av_channel_layout_custom_init(
    channel_layout: *mut AVChannelLayout,
    nb_channels: i32,
) -> i32
Expand description

Initialize a custom channel layout with the specified number of channels. The channel map will be allocated and the designation of all channels will be set to AV_CHAN_UNKNOWN.

This is only a convenience helper function, a custom channel layout can also be constructed without using this.

@param channel_layout the layout structure to be initialized @param nb_channels the number of channels

@return 0 on success AVERROR(EINVAL) if the number of channels <= 0 AVERROR(ENOMEM) if the channel map could not be allocated