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

Unified Diff: content/common/gpu/media/android_video_decode_accelerator.cc

Issue 1541353002: Add offset support to BitstreamBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comment and fix one flush issue Created 4 years, 11 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
Index: content/common/gpu/media/android_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/android_video_decode_accelerator.cc b/content/common/gpu/media/android_video_decode_accelerator.cc
index 2cc7c32c14d5d21f49b46ab24e38942bb15db94a..48971b352f5e9e58c3c3c83c2c7084c851509f0b 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.cc
+++ b/content/common/gpu/media/android_video_decode_accelerator.cc
@@ -222,10 +222,10 @@ bool AndroidVideoDecodeAccelerator::QueueInput() {
return true;
}
- scoped_ptr<base::SharedMemory> shm(
- new base::SharedMemory(bitstream_buffer.handle(), true));
- RETURN_ON_FAILURE(this, shm->Map(bitstream_buffer.size()),
- "Failed to SharedMemory::Map()", UNREADABLE_INPUT, false);
+ scoped_ptr<SharedMemoryRegion> shm(
+ new SharedMemoryRegion(bitstream_buffer, true));
+ RETURN_ON_FAILURE(this, shm->Map(), "Failed to SharedMemoryRegion::Map()",
+ UNREADABLE_INPUT, false);
const base::TimeDelta presentation_timestamp =
bitstream_buffer.presentation_timestamp();

Powered by Google App Engine
This is Rietveld 408576698