miniobject: disallow a double write/exclusive lock
authorMatthew Waters <matthew@centricular.com>
Sun, 31 May 2015 11:25:23 +0000 (21:25 +1000)
committerMatthew Waters <matthew@centricular.com>
Wed, 3 Jun 2015 10:41:44 +0000 (20:41 +1000)
commitad4569c893e10e0e2dcaab3a076d837ae2bffa35
tree1297cb20d3e98dda0043a001dcb294d0f58520fc
parent935ecd85eaeb959158faa86ce32c03eca98a3665
miniobject: disallow a double write/exclusive lock

gst_memory_lock (mem, WRITE | EXCLUSIVE);
gst_memory_lock (mem, WRITE | EXCLUSIVE);

Succeeds when the part-miniobject.txt design doc suggests that this should fail:

  "A gst_mini_object_lock() can fail when a WRITE lock is requested and
  the exclusive counter is > 1. Indeed a GstMiniObject object with an
  exclusive counter 1 is locked EXCLUSIVELY by at least 2 objects and is
  therefore not writable."

https://bugzilla.gnome.org/show_bug.cgi?id=750172
gst/gstminiobject.c
tests/check/gst/gstmemory.c