From 030bf5e56027e29649d46d56bae276c418c85119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 4 Jul 2023 17:34:21 +0300 Subject: [PATCH] audio: Make GST_DSD_FORMAT_UNKNOWN -1 instead of 0xffffffff 0xffffffff is mapped to 2**32 - 1 but GLib enums are signed ints so this value is out of range and causes problems with bindings. Part-of: --- .../gst-plugins-base/gst-libs/gst/audio/gstdsdformat.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/audio/gstdsdformat.h b/subprojects/gst-plugins-base/gst-libs/gst/audio/gstdsdformat.h index b5c97143d9..93f6b22754 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/audio/gstdsdformat.h +++ b/subprojects/gst-plugins-base/gst-libs/gst/audio/gstdsdformat.h @@ -32,13 +32,13 @@ G_BEGIN_DECLS /** * GstDsdFormat: - * @GST_NUM_DSD_FORMATS: number of valid DSD formats * @GST_DSD_FORMAT_UNKNOWN: unknown / invalid DSD format * @GST_DSD_FORMAT_U8: 8 DSD bits in 1 byte * @GST_DSD_FORMAT_U16LE: 16 DSD bits in 2 bytes, little endian order * @GST_DSD_FORMAT_U16BE: 16 DSD bits in 2 bytes, big endian order * @GST_DSD_FORMAT_U32LE: 32 DSD bits in 4 bytes, little endian order * @GST_DSD_FORMAT_U32BE: 32 DSD bits in 4 bytes, big endian order + * @GST_NUM_DSD_FORMATS: number of valid DSD formats * @GST_DSD_FORMAT_U16: 16 DSD bits in 2 bytes, native endianness * @GST_DSD_FORMAT_U32: 32 DSD bits in 4 bytes, native endianness * @@ -47,6 +47,7 @@ G_BEGIN_DECLS * Since: 1.24 */ typedef enum { + GST_DSD_FORMAT_UNKNOWN = -1, GST_DSD_FORMAT_U8 = 0, GST_DSD_FORMAT_U16LE, GST_DSD_FORMAT_U16BE, @@ -55,8 +56,6 @@ typedef enum { GST_NUM_DSD_FORMATS, - GST_DSD_FORMAT_UNKNOWN = 0xffffffff, - /* native endianness equivalents */ GST_DSD_FORMAT_U16 = _GST_DSD_FORMAT_NE(U16), GST_DSD_FORMAT_U32 = _GST_DSD_FORMAT_NE(U32)