Commit 329351de authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

v4l2: fix mmap() call

Shared anonymous mapping did not make much sense.
parent 63e5e898
...@@ -504,7 +504,7 @@ void DemuxClose( vlc_object_t *obj ) ...@@ -504,7 +504,7 @@ void DemuxClose( vlc_object_t *obj )
static block_t *UserPtrQueue (vlc_object_t *obj, int fd, size_t length) static block_t *UserPtrQueue (vlc_object_t *obj, int fd, size_t length)
{ {
void *ptr = mmap (NULL, length, PROT_READ | PROT_WRITE, void *ptr = mmap (NULL, length, PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_ANONYMOUS, -1, 0); MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (ptr == MAP_FAILED) if (ptr == MAP_FAILED)
{ {
msg_Err (obj, "cannot allocate %zu-bytes buffer: %m", length); msg_Err (obj, "cannot allocate %zu-bytes buffer: %m", length);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment