Index: content/common/gpu/media/vaapi_video_decode_accelerator.cc |
diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.cc b/content/common/gpu/media/vaapi_video_decode_accelerator.cc |
index fab601ede03ba1763ffe2a1da0ae3a7d6a1c3c46..9b34c54a64ec959f6cc5d93df01114036efe2b24 100644 |
--- a/content/common/gpu/media/vaapi_video_decode_accelerator.cc |
+++ b/content/common/gpu/media/vaapi_video_decode_accelerator.cc |
@@ -445,10 +445,10 @@ void VaapiVideoDecodeAccelerator::MapAndQueueNewInputBuffer( |
DVLOG(4) << "Mapping new input buffer id: " << bitstream_buffer.id() |
<< " size: " << (int)bitstream_buffer.size(); |
- scoped_ptr<base::SharedMemory> shm( |
- new base::SharedMemory(bitstream_buffer.handle(), true)); |
- RETURN_AND_NOTIFY_ON_FAILURE(shm->Map(bitstream_buffer.size()), |
- "Failed to map input buffer", UNREADABLE_INPUT,); |
+ scoped_ptr<SharedMemoryRegion> shm( |
+ new SharedMemoryRegion(bitstream_buffer, true)); |
+ RETURN_AND_NOTIFY_ON_FAILURE(shm->Map(), "Failed to map input buffer", |
+ UNREADABLE_INPUT, ); |
base::AutoLock auto_lock(lock_); |
@@ -456,7 +456,6 @@ void VaapiVideoDecodeAccelerator::MapAndQueueNewInputBuffer( |
linked_ptr<InputBuffer> input_buffer(new InputBuffer()); |
input_buffer->shm.reset(shm.release()); |
input_buffer->id = bitstream_buffer.id(); |
- input_buffer->size = bitstream_buffer.size(); |
++num_stream_bufs_at_decoder_; |
TRACE_COUNTER1("Video Decoder", "Stream buffers at decoder", |
@@ -501,7 +500,7 @@ bool VaapiVideoDecodeAccelerator::GetInputBuffer_Locked() { |
decoder_->SetStream( |
static_cast<uint8*>(curr_input_buffer_->shm->memory()), |
- curr_input_buffer_->size); |
+ curr_input_buffer_->shm->size()); |
return true; |
default: |