From 7fa56e6afb37dba02bf828b388c947aa73050d91 Mon Sep 17 00:00:00 2001 From: Eunhae Choi Date: Fri, 15 Feb 2019 18:28:09 +0900 Subject: [PATCH] util: add GST_GROUP_ID_INVALID - get upstream patch to apply latest playback code commit: e5c15f6b9605a1e682a60ea1bfadae831e651a41 Various plugins use special values (0 or G_MAXUINT32) as an invalid/unset group_id, but nothing guarantees a groupid won't have that value. Instead define a value which group_id will never have and make gst_group_id_next() always return a value different from that. Change-Id: Ia77c491ff9a6389b769e3388efa826391211cb6b --- gst/gstutils.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gst/gstutils.h b/gst/gstutils.h index 414388d4cc..bf859b1d78 100644 --- a/gst/gstutils.h +++ b/gst/gstutils.h @@ -79,6 +79,18 @@ guint64 gst_util_uint64_scale_int_ceil (guint64 val, gint num, gint den guint32 gst_util_seqnum_next (void); gint32 gst_util_seqnum_compare (guint32 s1, guint32 s2); +/** + * GST_GROUP_ID_INVALID: + * + * A value which is guaranteed to never be returned by + * gst_util_group_id_next(). + * + * Can be used as a default value in variables used to store group_id. + * + * Since: 1.14 + */ +#define GST_GROUP_ID_INVALID (0) + guint gst_util_group_id_next (void); /** -- 2.34.1