| Index: content/common/gpu/media/fake_video_decode_accelerator.cc
|
| diff --git a/content/common/gpu/media/fake_video_decode_accelerator.cc b/content/common/gpu/media/fake_video_decode_accelerator.cc
|
| index 7524dd18ebf05ec3b60f6c9dcb3232ad2fad4b9f..230c4f34c86e48bbf2f73e852a7297cc4ae6c3af 100644
|
| --- a/content/common/gpu/media/fake_video_decode_accelerator.cc
|
| +++ b/content/common/gpu/media/fake_video_decode_accelerator.cc
|
| @@ -67,6 +67,16 @@ bool FakeVideoDecodeAccelerator::Initialize(const Config& config,
|
|
|
| void FakeVideoDecodeAccelerator::Decode(
|
| const media::BitstreamBuffer& bitstream_buffer) {
|
| + // We won't really read from the bitstream_buffer, close the handle.
|
| + if (base::SharedMemory::IsHandleValid(bitstream_buffer.handle()))
|
| + base::SharedMemory::CloseHandle(bitstream_buffer.handle());
|
| +
|
| + if (bitstream_buffer.id() < 0) {
|
| + LOG(ERROR) << "Invalid bitstream: id=" << bitstream_buffer.id();
|
| + client_->NotifyError(INVALID_ARGUMENT);
|
| + return;
|
| + }
|
| +
|
| int bitstream_buffer_id = bitstream_buffer.id();
|
| queued_bitstream_ids_.push(bitstream_buffer_id);
|
| child_task_runner_->PostTask(
|
|
|