Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(931)

Unified Diff: media/video/capture/linux/video_capture_device_linux.cc

Issue 14265002: Linux video capture, invoking mmap() with both READ and WRITE. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/linux/video_capture_device_linux.cc
===================================================================
--- media/video/capture/linux/video_capture_device_linux.cc (revision 194158)
+++ media/video/capture/linux/video_capture_device_linux.cc (working copy)
@@ -468,7 +468,9 @@
return false;
}
- buffer_pool_[i].start = mmap(NULL, buffer.length, PROT_READ,
+ // Some devices require mmap() to be called with both READ and WRITE.
+ // See crbug.com/178582.
+ buffer_pool_[i].start = mmap(NULL, buffer.length, PROT_READ | PROT_WRITE,
MAP_SHARED, device_fd_, buffer.m.offset);
if (buffer_pool_[i].start == MAP_FAILED) {
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698