Index: content/common/gpu/media/gpu_video_decode_accelerator.cc |
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc |
index d70b5eee80fb77ac2abbdeed01d720a9e4a102ad..682ddc3fea8f50d3f0a9c45aa6b8f9b9136eb10a 100644 |
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc |
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc |
@@ -492,31 +492,8 @@ void GpuVideoDecodeAccelerator::OnSetCdm(int cdm_id) { |
// Runs on IO thread if video_decode_accelerator_->CanDecodeOnIOThread() is |
// true, otherwise on the main thread. |
void GpuVideoDecodeAccelerator::OnDecode( |
- const AcceleratedVideoDecoderMsg_Decode_Params& params) { |
+ const media::BitstreamBuffer& bitstream_buffer) { |
DCHECK(video_decode_accelerator_); |
- if (params.bitstream_buffer_id < 0) { |
- DLOG(ERROR) << "BitstreamBuffer id " << params.bitstream_buffer_id |
- << " out of range"; |
- if (child_task_runner_->BelongsToCurrentThread()) { |
- NotifyError(media::VideoDecodeAccelerator::INVALID_ARGUMENT); |
- } else { |
- child_task_runner_->PostTask( |
- FROM_HERE, |
- base::Bind(&GpuVideoDecodeAccelerator::NotifyError, |
- base::Unretained(this), |
- media::VideoDecodeAccelerator::INVALID_ARGUMENT)); |
- } |
- return; |
- } |
- |
- media::BitstreamBuffer bitstream_buffer(params.bitstream_buffer_id, |
- params.buffer_handle, params.size, |
- params.presentation_timestamp); |
- if (!params.key_id.empty()) { |
- bitstream_buffer.SetDecryptConfig( |
- media::DecryptConfig(params.key_id, params.iv, params.subsamples)); |
- } |
- |
video_decode_accelerator_->Decode(bitstream_buffer); |
} |