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

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: Created 5 years 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 00e1bb67856e14163ea5da84a6d04a37607335de..62efb68dfe5f04ff96c4282730c2c2aa17384b89 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.cc
+++ b/content/common/gpu/media/android_video_decode_accelerator.cc
@@ -206,8 +206,9 @@ void AndroidVideoDecodeAccelerator::QueueInput() {
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);
+ RETURN_ON_FAILURE(
+ this, shm->MapAt(bitstream_buffer.offset(), bitstream_buffer.size()),
Pawel Osciak 2015/12/24 00:58:01 MapAt (and underlying mmap()) requires offset to b
Owen Lin 2015/12/24 08:01:35 I think we can do it in ArcCodec. Align the input
+ "Failed to SharedMemory::Map()", UNREADABLE_INPUT);
const base::TimeDelta presentation_timestamp =
bitstream_buffer.presentation_timestamp();

Powered by Google App Engine
This is Rietveld 408576698