Commit 264d8a3e authored by braveyao@chromium.org's avatar braveyao@chromium.org

Linux video capture, invoking mmap() with both READ and WRITE.

BUG=178582
TEST=media_unittests

Review URL: https://chromiumcodereview.appspot.com/14265002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195150 0039d316-1c4b-4281-b951-d872f2087c98
parent cf351c24
...@@ -468,7 +468,9 @@ bool VideoCaptureDeviceLinux::AllocateVideoBuffers() { ...@@ -468,7 +468,9 @@ bool VideoCaptureDeviceLinux::AllocateVideoBuffers() {
return false; 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); MAP_SHARED, device_fd_, buffer.m.offset);
if (buffer_pool_[i].start == MAP_FAILED) { if (buffer_pool_[i].start == MAP_FAILED) {
return false; return false;
......
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