Commit 42814eb4 authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Chromium LUCI CQ

media/gpu/vea_tests: Fix crash when using --dcheck_always_on=true

video_encode_accelerator_tests crashes if the test is built with
--dcheck_always_on=true. It is because the sequence that destroys
a decoder used in BitstreamValidator is different from one that
initializes the decoder. This fixes the issue by destroying the
decoder in the same sequence as of initialization.

Bug: b:174318867
Test: video_encode_accelerator_tests on volteer
Change-Id: I76a224705534945ee7f4c4ab8e1c1dd73fdcacea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2592853
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarDavid Staessens <dstaessens@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837889}
parent 9eb5a9d6
......@@ -120,7 +120,12 @@ BitstreamValidator::BitstreamValidator(
DETACH_FROM_SEQUENCE(validator_thread_sequence_checker_);
}
BitstreamValidator::~BitstreamValidator() = default;
BitstreamValidator::~BitstreamValidator() {
// Since |decoder_| has to be destroyed on the sequence that executes
// Initialize(). Destroys it on the validator thread task runner.
if (validator_thread_.IsRunning())
validator_thread_.task_runner()->DeleteSoon(FROM_HERE, std::move(decoder_));
}
void BitstreamValidator::ProcessBitstream(scoped_refptr<BitstreamRef> bitstream,
size_t frame_index) {
......
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