VAVDA: Don't use an event to wait for the decoder thread to be drained.
commit4188350f5c5bfa765cb0cfdbe250d4b6e613c2c5
authorposciak@chromium.org <posciak@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 17 Jun 2014 09:38:02 +0000 (17 09:38 +0000)
committerposciak@chromium.org <posciak@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 17 Jun 2014 09:38:02 +0000 (17 09:38 +0000)
treed1d1f4aad6f5fa55dcecbf81ca1a751898f0da4e
parentcb1640cbe616059215ff83c9ed6ed886328fa1c2
VAVDA: Don't use an event to wait for the decoder thread to be drained.

On destruction, the ChildThread waits for a Signal() to a WaitableEvent
posted onto the decoder thread, to ensure that the thread is drained.
This is not needed however, as Stop() will ensure that the thread is
drained anyway.

But because the Signal() task is posted onto the thread via a proxy, if
the thread is already stopped, it will let us post, but the task will
never execute, and we could wait forever.

BUG=384660
TEST=vdatest,video playback

Review URL: https://codereview.chromium.org/337853002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277686 0039d316-1c4b-4281-b951-d872f2087c98
content/common/gpu/media/vaapi_video_decode_accelerator.cc