mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
miniobject: check writability
fix the writability check for miniobjects. We should check the shared counter. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681450
This commit is contained in:
parent
55f9862999
commit
97441c27ee
1 changed files with 1 additions and 1 deletions
|
@ -287,7 +287,7 @@ gst_mini_object_is_writable (const GstMiniObject * mini_object)
|
||||||
g_return_val_if_fail (mini_object != NULL, FALSE);
|
g_return_val_if_fail (mini_object != NULL, FALSE);
|
||||||
|
|
||||||
if (GST_MINI_OBJECT_IS_LOCKABLE (mini_object)) {
|
if (GST_MINI_OBJECT_IS_LOCKABLE (mini_object)) {
|
||||||
result = (g_atomic_int_get (&mini_object->lockstate) & SHARE_MASK) < 2;
|
result = !IS_SHARED (g_atomic_int_get (&mini_object->lockstate));
|
||||||
} else {
|
} else {
|
||||||
result = (GST_MINI_OBJECT_REFCOUNT_VALUE (mini_object) == 1);
|
result = (GST_MINI_OBJECT_REFCOUNT_VALUE (mini_object) == 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue