| Index: content/common/gpu/media/v4l2_video_decode_accelerator.cc
|
| diff --git a/content/common/gpu/media/v4l2_video_decode_accelerator.cc b/content/common/gpu/media/v4l2_video_decode_accelerator.cc
|
| index f9311257ed70cbf3c78ba7adf4da9805a5f0736e..1b65067cfb44acc8271017a57651015e1b762c1d 100644
|
| --- a/content/common/gpu/media/v4l2_video_decode_accelerator.cc
|
| +++ b/content/common/gpu/media/v4l2_video_decode_accelerator.cc
|
| @@ -305,6 +305,14 @@ void V4L2VideoDecodeAccelerator::Decode(
|
| << ", size=" << bitstream_buffer.size();
|
| DCHECK(io_task_runner_->BelongsToCurrentThread());
|
|
|
| + if (bitstream_buffer.id() < 0) {
|
| + LOG(ERROR) << "Invalid bitstream_buffer, id: " << bitstream_buffer.id();
|
| + if (base::SharedMemory::IsHandleValid(bitstream_buffer.handle()))
|
| + base::SharedMemory::CloseHandle(bitstream_buffer.handle());
|
| + NOTIFY_ERROR(INVALID_ARGUMENT);
|
| + return;
|
| + }
|
| +
|
| // DecodeTask() will take care of running a DecodeBufferTask().
|
| decoder_thread_.message_loop()->PostTask(FROM_HERE, base::Bind(
|
| &V4L2VideoDecodeAccelerator::DecodeTask, base::Unretained(this),
|
|
|