summaryrefslogtreecommitdiff
path: root/gst/camerabin2
diff options
context:
space:
mode:
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2011-09-14 15:20:09 +0100
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-09-16 00:52:53 -0300
commit25c3ce9a7aeb80f500b8c6070c9ee2a1290ac0a9 (patch)
treed26c5c6b8f6ede5d1d4d3f3a25be1e9564632b64 /gst/camerabin2
parentcc27a7fe3a4b3df3e629b539271dd992ea3c577f (diff)
downloadgstreamer-plugins-bad-25c3ce9a7aeb80f500b8c6070c9ee2a1290ac0a9.tar.gz
camerabin2: replace deprecated g_atomic_int_exchange_and_add
It was replaced by g_atomic_int_add, which now returns the old value. https://bugzilla.gnome.org/show_bug.cgi?id=659061
Diffstat (limited to 'gst/camerabin2')
-rw-r--r--gst/camerabin2/gstcamerabin2.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c
index aac9cc3d1..812f1bfdd 100644
--- a/gst/camerabin2/gstcamerabin2.c
+++ b/gst/camerabin2/gstcamerabin2.c
@@ -166,9 +166,15 @@
#include <gst/gst-i18n-plugin.h>
#include <gst/pbutils/pbutils.h>
+#if GLIB_CHECK_VERSION(2,29,6)
+#define gst_camerabin2_atomic_int_add g_atomic_int_add
+#else
+#define gst_camerabin2_atomic_int_add g_atomic_int_exchange_and_add
+#endif
+
#define GST_CAMERA_BIN2_PROCESSING_INC(c) \
{ \
- gint bef = g_atomic_int_exchange_and_add (&c->processing_counter, 1); \
+ gint bef = gst_camerabin2_atomic_int_add (&c->processing_counter, 1); \
if (bef == 0) \
g_object_notify (G_OBJECT (c), "idle"); \
GST_DEBUG_OBJECT ((c), "Processing counter incremented to: %d", \