From 53800b308ba06f7655d09694d7a3cc58d894fcd2 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Thu, 26 May 2022 15:26:40 +0100 Subject: [PATCH] GST_CHECK_VERSION: Fix unexpected "git = next version" assumption MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 1.21.0.1 should not satisfy a check for 1.22.0. If someone needs more control they should do a feature check for the symbol in the headers or lib. Based on a similar patch by Tim-Philipp Müller for libnice. Part-of: --- subprojects/gstreamer/gst/gstversion.h.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/subprojects/gstreamer/gst/gstversion.h.in b/subprojects/gstreamer/gst/gstversion.h.in index a74c2d1..b3a48c0 100644 --- a/subprojects/gstreamer/gst/gstversion.h.in +++ b/subprojects/gstreamer/gst/gstversion.h.in @@ -77,14 +77,17 @@ G_BEGIN_DECLS * * Check whether a GStreamer version equal to or greater than * major.minor.micro is present. + * + * Note: Since version 1.22 this macro can no longer be used to check that + * current git version maps to the next version. So for instance, + * GST_CHECK_VERSION(1, 22, 0) on a git checkout of the 1.21 development version + * will expand to `FALSE`. */ #define GST_CHECK_VERSION(major,minor,micro) \ (GST_VERSION_MAJOR > (major) || \ (GST_VERSION_MAJOR == (major) && GST_VERSION_MINOR > (minor)) || \ (GST_VERSION_MAJOR == (major) && GST_VERSION_MINOR == (minor) && \ - GST_VERSION_MICRO >= (micro)) || \ - (GST_VERSION_MAJOR == (major) && GST_VERSION_MINOR == (minor) && \ - GST_VERSION_MICRO + 1 == (micro) && GST_VERSION_NANO > 0)) + GST_VERSION_MICRO >= (micro))) G_END_DECLS -- 2.7.4