audio: make GST_AUDIO_INFO_IS_UNPOSITIONED return a boolean
authorTim-Philipp Müller <tim@centricular.com>
Sun, 26 Sep 2021 00:52:12 +0000 (01:52 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 29 Sep 2021 23:53:12 +0000 (23:53 +0000)
Luckily this worked right since the flag we check is the
only flag and its vale is 1, but feels more correct to
actually check for non-zeroness.

Spotted by Stirling Westrup.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/926>

subprojects/gst-plugins-base/gst-libs/gst/audio/audio-info.h

index cc9e972..8cc6d36 100644 (file)
@@ -93,7 +93,7 @@ GType gst_audio_info_get_type                (void);
 #define GST_AUDIO_INFO_IS_BIG_ENDIAN(i)      (GST_AUDIO_FORMAT_INFO_IS_BIG_ENDIAN((i)->finfo))
 
 #define GST_AUDIO_INFO_FLAGS(info)           ((info)->flags)
-#define GST_AUDIO_INFO_IS_UNPOSITIONED(info) ((info)->flags & GST_AUDIO_FLAG_UNPOSITIONED)
+#define GST_AUDIO_INFO_IS_UNPOSITIONED(info) (((info)->flags & GST_AUDIO_FLAG_UNPOSITIONED) != 0)
 #define GST_AUDIO_INFO_LAYOUT(info)          ((info)->layout)
 
 #define GST_AUDIO_INFO_RATE(info)            ((info)->rate)