[vlc-commits] v4l2: fix mmap() call
Rémi Denis-Courmont
git at videolan.org
Mon Apr 16 17:36:55 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr 16 18:36:25 2012 +0300| [329351de5e19e5548bfb2303ef93cbb6852e2665] | committer: Rémi Denis-Courmont
v4l2: fix mmap() call
Shared anonymous mapping did not make much sense.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=329351de5e19e5548bfb2303ef93cbb6852e2665
---
modules/access/v4l2/demux.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/access/v4l2/demux.c b/modules/access/v4l2/demux.c
index 889a949..bee8c67 100644
--- a/modules/access/v4l2/demux.c
+++ b/modules/access/v4l2/demux.c
@@ -504,7 +504,7 @@ void DemuxClose( vlc_object_t *obj )
static block_t *UserPtrQueue (vlc_object_t *obj, int fd, size_t length)
{
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)
{
msg_Err (obj, "cannot allocate %zu-bytes buffer: %m", length);
More information about the vlc-commits
mailing list