aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2022-09-25 20:00:46 -0300
committerJames Almer <jamrial@gmail.com>2022-09-28 12:21:18 -0300
commit299253ae1b010eeee81d5a2f291a490627fa482d (patch)
tree1e175f22a775ffd5fe4e5666f919d502bb003124
parentbcd2e7d685730838a07c0e88650ea8bbbe460df1 (diff)
downloadffmpeg-299253ae1b010eeee81d5a2f291a490627fa482d.tar.gz
avutil/channel_layout: move and improve the comment about unknown orders
Don't place it as doxy specific for the order field, and generalize it both to also cover already defined orders and to not make it seem like the user is required to handle a layout they don't fully support or understand. Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavutil/channel_layout.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavutil/channel_layout.h b/libavutil/channel_layout.h
index 9e685fab72..ff2b57bbe3 100644
--- a/libavutil/channel_layout.h
+++ b/libavutil/channel_layout.h
@@ -266,6 +266,9 @@ typedef struct AVChannelCustom {
* A channel layout here is defined as a set of channels ordered in a specific
* way (unless the channel order is AV_CHANNEL_ORDER_UNSPEC, in which case an
* AVChannelLayout carries only the channel count).
+ * All orders may be treated as if they were AV_CHANNEL_ORDER_UNSPEC by
+ * ignoring everything but the channel count, as long as av_channel_layout_check()
+ * considers they are valid.
*
* Unlike most structures in Libav, sizeof(AVChannelLayout) is a part of the
* public ABI and may be used by the caller. E.g. it may be allocated on stack
@@ -290,9 +293,6 @@ 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;