summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2011-06-04 14:04:44 -0700
committerDavid Schleef <ds@schleef.org>2011-06-04 14:09:30 -0700
commit7b12d4647a8a6a549143cdb6afa9294d1192efda (patch)
tree0b1ff18a0afa808aaf719fb5b689b98a7cfa3216
parent76fad771496ddcbc2f9091b85ceb897bec25aaa4 (diff)
downloadgstreamer-plugins-bad-7b12d4647a8a6a549143cdb6afa9294d1192efda.tar.gz
Work around changes in g_atomic API
See #651514 for details.
-rw-r--r--gst/liveadder/liveadder.c4
-rw-r--r--gst/mxf/mxfmux.c5
-rw-r--r--gst/videomeasure/gstvideomeasure_ssim.c4
3 files changed, 12 insertions, 1 deletions
diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c
index df6cda5de..01a7b057a 100644
--- a/gst/liveadder/liveadder.c
+++ b/gst/liveadder/liveadder.c
@@ -1377,7 +1377,11 @@ gst_live_adder_request_new_pad (GstElement * element, GstPadTemplate * templ,
adder = GST_LIVE_ADDER (element);
/* increment pad counter */
+#if GLIB_CHECK_VERSION(2,29,5)
+ padcount = g_atomic_int_add (&adder->padcount, 1);
+#else
padcount = g_atomic_int_exchange_and_add (&adder->padcount, 1);
+#endif
name = g_strdup_printf ("sink%d", padcount);
newpad = gst_pad_new_from_template (templ, name);
diff --git a/gst/mxf/mxfmux.c b/gst/mxf/mxfmux.c
index d463a0348..403fff8f3 100644
--- a/gst/mxf/mxfmux.c
+++ b/gst/mxf/mxfmux.c
@@ -409,8 +409,11 @@ gst_mxf_mux_request_new_pad (GstElement * element,
GST_ERROR_OBJECT (mux, "Not our template");
return NULL;
}
-
+#if GLIB_CHECK_VERSION(2,29,5)
+ pad_number = g_atomic_int_add ((gint *) & mux->n_pads, 1);
+#else
pad_number = g_atomic_int_exchange_and_add ((gint *) & mux->n_pads, 1);
+#endif
name = gst_mxf_mux_create_pad_name (templ, pad_number);
GST_DEBUG_OBJECT (mux, "Creating pad '%s'", name);
diff --git a/gst/videomeasure/gstvideomeasure_ssim.c b/gst/videomeasure/gstvideomeasure_ssim.c
index a99fa9ff3..19d03d4de 100644
--- a/gst/videomeasure/gstvideomeasure_ssim.c
+++ b/gst/videomeasure/gstvideomeasure_ssim.c
@@ -1183,7 +1183,11 @@ gst_ssim_request_new_pad (GstElement * element, GstPadTemplate * templ,
goto could_not_add_sink;
else
/* increment pad counter */
+#if GLIB_CHECK_VERSION(2,29,5)
+ padcount = g_atomic_int_add (&ssim->padcount, 1);
+#else
padcount = g_atomic_int_exchange_and_add (&ssim->padcount, 1);
+#endif
if (num >= 0) {
GstSSimOutputContext *c;