| Index: media/gpu/v4l2_video_decode_accelerator.cc
|
| diff --git a/media/gpu/v4l2_video_decode_accelerator.cc b/media/gpu/v4l2_video_decode_accelerator.cc
|
| index 470eb27e3e51684f18ced41c4cb7b84fbc6337fb..670e5a722520c19e7b8b2240b4253fcc6f6aa5c7 100644
|
| --- a/media/gpu/v4l2_video_decode_accelerator.cc
|
| +++ b/media/gpu/v4l2_video_decode_accelerator.cc
|
| @@ -385,11 +385,19 @@ void V4L2VideoDecodeAccelerator::AssignPictureBuffersTask(
|
| DCHECK_EQ(output_record.egl_sync, EGL_NO_SYNC_KHR);
|
| DCHECK_EQ(output_record.picture_id, -1);
|
| DCHECK_EQ(output_record.cleared, false);
|
| - DCHECK_EQ(1u, buffers[i].service_texture_ids().size());
|
| DCHECK(output_record.processor_input_fds.empty());
|
|
|
| output_record.picture_id = buffers[i].id();
|
| +
|
| + if (buffers[i].service_texture_ids().empty()) {
|
| + LOGF(ERROR) << "No texture ids provided";
|
| + NOTIFY_ERROR(INVALID_ARGUMENT);
|
| + return;
|
| + }
|
| + // We only support one texture per buffer currently.
|
| + DCHECK_EQ(1u, buffers[i].service_texture_ids().size());
|
| output_record.texture_id = buffers[i].service_texture_ids()[0];
|
| +
|
| // This will remain kAtClient until ImportBufferForPicture is called, either
|
| // by the client, or by ourselves, if we are allocating.
|
| output_record.state = kAtClient;
|
|
|