memory: Fix the NO_SHARE flag in the constructor

The NO_SHARE flag does not influence the exclusiveness of the buffer initially
but only if a _share operation can be done. Otherwise, we would not be able to
WRITE map a buffer memory because it would have a share count of at least 2.
This commit is contained in:
Wim Taymans 2012-07-03 13:47:49 +02:00
parent 4a0dd59808
commit 9a20741b0a

View file

@ -153,7 +153,6 @@ _default_mem_init (GstMemoryDefault * mem, GstMemoryFlags flags,
mem->mem.allocator = _default_mem_impl;
mem->mem.parent = parent ? gst_memory_ref (parent) : NULL;
mem->mem.state = (flags & GST_MEMORY_FLAG_READONLY ? GST_LOCK_FLAG_READ : 0);
mem->mem.state |= (flags & GST_MEMORY_FLAG_NO_SHARE ? SHARE_ONE : 0);
mem->mem.maxsize = maxsize;
mem->mem.align = align;
mem->mem.offset = offset;