[FFmpeg-devel] [PATCH v2 4/5] avutil/channel_layout: add av_channel_layout_retype()
Anton Khirnov
anton at khirnov.net
Thu Feb 1 11:02:04 EET 2024
Quoting Marton Balint (2024-02-01 00:01:36)
> diff --git a/libavutil/channel_layout.h b/libavutil/channel_layout.h
> index 37629ab5d2..7e27a00d39 100644
> --- a/libavutil/channel_layout.h
> +++ b/libavutil/channel_layout.h
> @@ -817,6 +817,17 @@ int av_channel_layout_check(const AVChannelLayout *channel_layout);
> */
> int av_channel_layout_compare(const AVChannelLayout *chl, const AVChannelLayout *chl1);
>
> +/**
> + * Try changing the AVChannelOrder of a channel layout.
What exactly is the rule for when the change succeeds or not? I would
expect it to be when all the channels can be represented in the new
order, but that is not the case for conversion to unspec.
> + *
> + * @param channel_layout channel layout which will be changed
> + * @param order the desired channel layout order
> + * @return 0 on success or if the channel layout is already in the desired order
> + * 1 if using the desired order is not possible for the specified layout
AVERROR(ENOSYS) seems more consistent to me
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list