Commit bdef670b authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu/test/VEClient: Fix a hang issue of --disable_validator

This fixes an issue that FlushDone() in VideoEncoderClient will
never be called when the test runs with --disable_validator and
the VideoEncodeAccelerator doesn't support Flush().

Bug: None
Test: video_encode_acclerator_tests --disable_validator on trogdor
Change-Id: I8701a971deaa4cacfcd55a2c708de437a79ad863
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2537507Reviewed-by: default avatarDavid Staessens <dstaessens@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828005}
parent a284ed67
...@@ -366,13 +366,12 @@ void VideoEncoderClient::BitstreamBufferReady( ...@@ -366,13 +366,12 @@ void VideoEncoderClient::BitstreamBufferReady(
if (bitstream_processors_.empty()) { if (bitstream_processors_.empty()) {
BitstreamBufferProcessed(bitstream_buffer_id); BitstreamBufferProcessed(bitstream_buffer_id);
return; } else {
} auto bitstream_ref = CreateBitstreamRef(bitstream_buffer_id, metadata);
ASSERT_TRUE(bitstream_ref);
auto bitstream_ref = CreateBitstreamRef(bitstream_buffer_id, metadata); for (auto& bitstream_processor_ : bitstream_processors_) {
ASSERT_TRUE(bitstream_ref); bitstream_processor_->ProcessBitstream(bitstream_ref, frame_index_);
for (auto& bitstream_processor_ : bitstream_processors_) { }
bitstream_processor_->ProcessBitstream(bitstream_ref, frame_index_);
} }
frame_index_++; frame_index_++;
FlushDoneTaskIfNeeded(); FlushDoneTaskIfNeeded();
......
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