Commit 761cf7ce authored by David Staessens's avatar David Staessens Committed by Commit Bot

media/gpu/VaapiVD: Don't set decoder thread's task runner on re-initialization.

This CL makes a small change to the VaapiVideoDecoder to not set the decoder
thread's task runner and call set_parent_task_runner() on the video frame pool
upon re-initialization. They are redundant and cause an assert in the video
frame pool when executing in debug mode.

TEST=./video_decode_accelerator_tests --use_vd on eve

BUG=976507

Change-Id: Idb3712e5d835c4aa122ce7bc9f7efd2dd99600a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686666
Commit-Queue: David Staessens <dstaessens@chromium.org>
Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarChih-Yu Huang <akahuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683913}
parent af9106b5
......@@ -124,7 +124,6 @@ int VaapiVideoDecoder::GetMaxDecodeRequests() const {
return kMaxDecodeRequests;
}
// TODO(dstaessens): Handle re-initialization.
void VaapiVideoDecoder::Initialize(const VideoDecoderConfig& config,
bool low_delay,
CdmContext* cdm_context,
......@@ -155,8 +154,10 @@ void VaapiVideoDecoder::Initialize(const VideoDecoderConfig& config,
return;
}
decoder_thread_task_runner_ = decoder_thread_.task_runner();
frame_pool_->set_parent_task_runner(decoder_thread_task_runner_);
if (!decoder_thread_task_runner_) {
decoder_thread_task_runner_ = decoder_thread_.task_runner();
frame_pool_->set_parent_task_runner(decoder_thread_task_runner_);
}
decoder_thread_task_runner_->PostTask(
FROM_HERE,
......
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