| Index: media/gpu/v4l2_slice_video_decode_accelerator.cc
|
| diff --git a/media/gpu/v4l2_slice_video_decode_accelerator.cc b/media/gpu/v4l2_slice_video_decode_accelerator.cc
|
| index 1ff9abee697c1e8d40f68210e837ac4a189b96a7..a9ff75fa90657f4e03d0c423d517dada0c8ed9f7 100644
|
| --- a/media/gpu/v4l2_slice_video_decode_accelerator.cc
|
| +++ b/media/gpu/v4l2_slice_video_decode_accelerator.cc
|
| @@ -1629,7 +1629,6 @@ void V4L2SliceVideoDecodeAccelerator::AssignPictureBuffersTask(
|
| output_buffer_map_.resize(buffers.size());
|
| for (size_t i = 0; i < output_buffer_map_.size(); ++i) {
|
| DCHECK(buffers[i].size() == coded_size_);
|
| - DCHECK_EQ(1u, buffers[i].service_texture_ids().size());
|
|
|
| OutputRecord& output_record = output_buffer_map_[i];
|
| DCHECK(!output_record.at_device);
|
| @@ -1641,7 +1640,10 @@ void V4L2SliceVideoDecodeAccelerator::AssignPictureBuffersTask(
|
| DCHECK_EQ(output_record.cleared, false);
|
|
|
| output_record.picture_id = buffers[i].id();
|
| - output_record.texture_id = buffers[i].service_texture_ids()[0];
|
| + output_record.texture_id = buffers[i].service_texture_ids().empty()
|
| + ? 0
|
| + : buffers[i].service_texture_ids()[0];
|
| +
|
| // This will remain true until ImportBufferForPicture is called, either by
|
| // the client, or by ourselves, if we are allocating.
|
| output_record.at_client = true;
|
| @@ -1682,6 +1684,7 @@ void V4L2SliceVideoDecodeAccelerator::CreateEGLImageFor(
|
| uint32_t fourcc) {
|
| DVLOGF(3) << "index=" << buffer_index;
|
| DCHECK(child_task_runner_->BelongsToCurrentThread());
|
| + DCHECK_NE(texture_id, 0u);
|
|
|
| if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) {
|
| DLOGF(ERROR) << "GL callbacks required for binding to EGLImages";
|
|
|