Commit f7e80d29 authored by Chih-Yu Huang's avatar Chih-Yu Huang Committed by Commit Bot

media: Fix GPU crash when reloading video.

Originally we didn't keep the ownership of |gpu_task_runner_| when
creating VideoDecoder. When we create the second VideoDecoder, this
variable will become nullptr. This CL fixes this bug.

BUG=chromium:986752
TEST=reload crosvideo.appspot.com and no crash

Change-Id: I8abebd44b7423dff0bcb663ae74fdfe7e958e7fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1714625Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#680281}
parent 398f0940
...@@ -228,7 +228,7 @@ std::unique_ptr<VideoDecoder> GpuMojoMediaClient::CreateVideoDecoder( ...@@ -228,7 +228,7 @@ std::unique_ptr<VideoDecoder> GpuMojoMediaClient::CreateVideoDecoder(
auto frame_converter = std::make_unique<MailboxVideoFrameConverter>( auto frame_converter = std::make_unique<MailboxVideoFrameConverter>(
base::BindRepeating(&DmabufVideoFramePool::UnwrapFrame, base::BindRepeating(&DmabufVideoFramePool::UnwrapFrame,
base::Unretained(frame_pool.get())), base::Unretained(frame_pool.get())),
std::move(gpu_task_runner_), gpu_task_runner_,
base::BindOnce(&GetCommandBufferStub, gpu_task_runner_, base::BindOnce(&GetCommandBufferStub, gpu_task_runner_,
media_gpu_channel_manager_, media_gpu_channel_manager_,
command_buffer_id->channel_token, command_buffer_id->channel_token,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment