mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
gstobject: use the atomic macros to deal with the glib change in the impl.
This commit is contained in:
parent
ec6e452f63
commit
df099959fd
1 changed files with 2 additions and 1 deletions
|
@ -84,6 +84,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gst_private.h"
|
#include "gst_private.h"
|
||||||
|
#include "glib-compat-private.h"
|
||||||
|
|
||||||
#include "gstobject.h"
|
#include "gstobject.h"
|
||||||
#include "gstmarshal.h"
|
#include "gstmarshal.h"
|
||||||
|
@ -445,7 +446,7 @@ gst_object_replace (GstObject ** oldobj, GstObject * newobj)
|
||||||
g_object_ref (newobj);
|
g_object_ref (newobj);
|
||||||
do {
|
do {
|
||||||
oldptr = *oldobj;
|
oldptr = *oldobj;
|
||||||
} while (!g_atomic_pointer_compare_and_exchange ((void *) oldobj,
|
} while (!G_ATOMIC_POINTER_COMPARE_AND_EXCHANGE ((void *) oldobj,
|
||||||
oldptr, newobj));
|
oldptr, newobj));
|
||||||
if (oldptr)
|
if (oldptr)
|
||||||
g_object_unref (oldptr);
|
g_object_unref (oldptr);
|
||||||
|
|
Loading…
Reference in a new issue