Commit 0cbe979d authored by David Staessens's avatar David Staessens Committed by Commit Bot

media/gpu/test: Add extra check when shutting down the video decoder tests.

This CL makes sure the test video decoder client thread is running
before scheduling a cleanup task on shutdown. During normal operation
this should not be triggered, but it's a good idea to add an extra check
anyway.

TEST=./video_decode_accelerator_tests on nocturne

BUG=None

Change-Id: I0a3dde6fc6b9103d4a4d2f44e2e768b7e88d5d38
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032445Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Commit-Queue: David Staessens <dstaessens@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742048}
parent 26b2bfbf
...@@ -115,6 +115,10 @@ bool VideoDecoderClient::CreateDecoder() { ...@@ -115,6 +115,10 @@ bool VideoDecoderClient::CreateDecoder() {
void VideoDecoderClient::DestroyDecoder() { void VideoDecoderClient::DestroyDecoder() {
DCHECK_CALLED_ON_VALID_SEQUENCE(video_player_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(video_player_sequence_checker_);
if (!decoder_client_thread_.IsRunning()) {
return;
}
base::WaitableEvent done; base::WaitableEvent done;
decoder_client_thread_.task_runner()->PostTask( decoder_client_thread_.task_runner()->PostTask(
FROM_HERE, base::BindOnce(&VideoDecoderClient::DestroyDecoderTask, FROM_HERE, base::BindOnce(&VideoDecoderClient::DestroyDecoderTask,
......
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