Commit 42ec4bf0 authored by David Staessens's avatar David Staessens Committed by Commit Bot

media/gpu/test: Fix too large event timeout used in video decoder tests.

This CL fixes a small bug in the video_decode_accelerator_tests that can cause
the video decoder tests to wait longer for an event than the maximum specified
timeout.

TEST=./video_decode_accelerator_tests on eve

BUG=None

Change-Id: I1febbf335afffc00166c3b5e21139367bc68ad91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1735589Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Commit-Queue: David Staessens <dstaessens@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683915}
parent 53814b9e
...@@ -157,7 +157,7 @@ bool VideoPlayer::WaitForEvent(VideoPlayerEvent event, ...@@ -157,7 +157,7 @@ bool VideoPlayer::WaitForEvent(VideoPlayerEvent event,
return false; return false;
const base::TimeTicks start_time = base::TimeTicks::Now(); const base::TimeTicks start_time = base::TimeTicks::Now();
event_cv_.TimedWait(max_wait); event_cv_.TimedWait(max_wait - time_waiting);
time_waiting += base::TimeTicks::Now() - start_time; time_waiting += base::TimeTicks::Now() - start_time;
} }
} }
......
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