memory: only check the locking refcount
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 3 Jul 2012 11:47:30 +0000 (13:47 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 5 Jul 2012 09:19:16 +0000 (11:19 +0200)
gst/gstmemory.c

index 9bdce7e..686e1cf 100644 (file)
@@ -133,7 +133,7 @@ static void
 _gst_memory_free (GstMemory * mem)
 {
   /* there should be no outstanding mappings */
-  g_return_if_fail (g_atomic_int_get (&mem->state) < 4);
+  g_return_if_fail ((g_atomic_int_get (&mem->state) & LOCK_MASK) < 4);
   mem->allocator->info.mem_free (mem);
 }