[FFmpeg-cvslog] avutil/channel_layout: mention how the API user should treat channel orders it does not understand

James Almer git at videolan.org
Thu Sep 22 16:23:07 EEST 2022


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Wed Sep 21 18:30:47 2022 -0300| [05cff214b9234c0e24ffe73b0bb929787267c7e2] | committer: James Almer

avutil/channel_layout: mention how the API user should treat channel orders it does not understand

In case new orders are added in the future, existing library users can still
use the layout simply by ignoring everything but the channel count in it, so
make this explicit.

Reviewed-by: Anton Khirnov <anton at khirnov.net>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=05cff214b9234c0e24ffe73b0bb929787267c7e2
---

 libavutil/channel_layout.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavutil/channel_layout.h b/libavutil/channel_layout.h
index 4dd6614de9..9e685fab72 100644
--- a/libavutil/channel_layout.h
+++ b/libavutil/channel_layout.h
@@ -290,6 +290,9 @@ typedef struct AVChannelCustom {
 typedef struct AVChannelLayout {
     /**
      * Channel order used in this layout.
+     * Any value not defined in the AVChannelOrder enum in a layout that
+     * av_channel_layout_check() doesn't reject must be treated as if it was
+     * AV_CHANNEL_ORDER_UNSPEC.
      * This is a mandatory field.
      */
     enum AVChannelOrder order;



More information about the ffmpeg-cvslog mailing list