mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
GST_CHECK_VERSION: Fix unexpected "git = next version" assumption
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2501>
This commit is contained in:
parent
8e6872a36e
commit
53800b308b
1 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue