projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55f9862
)
miniobject: check writability
author
Wim Taymans
<wim.taymans@collabora.co.uk>
Thu, 9 Aug 2012 14:18:59 +0000
(16:18 +0200)
committer
Wim Taymans
<wim.taymans@collabora.co.uk>
Thu, 9 Aug 2012 14:18:59 +0000
(16:18 +0200)
fix the writability check for miniobjects. We should check the shared counter.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681450
gst/gstminiobject.c
patch
|
blob
|
history
diff --git
a/gst/gstminiobject.c
b/gst/gstminiobject.c
index
14b55de
..
2537164
100644
(file)
--- a/
gst/gstminiobject.c
+++ b/
gst/gstminiobject.c
@@
-287,7
+287,7
@@
gst_mini_object_is_writable (const GstMiniObject * mini_object)
g_return_val_if_fail (mini_object != NULL, FALSE);
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 {
result = (GST_MINI_OBJECT_REFCOUNT_VALUE (mini_object) == 1);
}