mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
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:
parent
4a0dd59808
commit
9a20741b0a
1 changed files with 0 additions and 1 deletions
|
@ -153,7 +153,6 @@ _default_mem_init (GstMemoryDefault * mem, GstMemoryFlags flags,
|
||||||
mem->mem.allocator = _default_mem_impl;
|
mem->mem.allocator = _default_mem_impl;
|
||||||
mem->mem.parent = parent ? gst_memory_ref (parent) : NULL;
|
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_READONLY ? GST_LOCK_FLAG_READ : 0);
|
||||||
mem->mem.state |= (flags & GST_MEMORY_FLAG_NO_SHARE ? SHARE_ONE : 0);
|
|
||||||
mem->mem.maxsize = maxsize;
|
mem->mem.maxsize = maxsize;
|
||||||
mem->mem.align = align;
|
mem->mem.align = align;
|
||||||
mem->mem.offset = offset;
|
mem->mem.offset = offset;
|
||||||
|
|
Loading…
Reference in a new issue