diff --git a/gst/gstmemory.c b/gst/gstmemory.c index afe68d9c3a..314c95fdad 100644 --- a/gst/gstmemory.c +++ b/gst/gstmemory.c @@ -580,7 +580,7 @@ gst_memory_unlock (GstMemory * mem, GstLockFlags flags) if (access_mode & GST_LOCK_FLAG_EXCLUSIVE) { /* shared counter */ g_return_if_fail (state >= SHARE_ONE); - newstate = state - SHARE_ONE; + newstate -= SHARE_ONE; access_mode &= ~GST_LOCK_FLAG_EXCLUSIVE; }