[WinCairo][MediaFoundation] The main thread can sometimes be blocked forever when...
authorpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Nov 2015 18:24:57 +0000 (18:24 +0000)
committerpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Nov 2015 18:24:57 +0000 (18:24 +0000)
commitc783cb3914c4dc556baf10449c26649cc9688eb4
tree788710abd61d861093df2a48943e232b14996c8f
parent37c0f4cc84db16179800214fad90a48426d52176
[WinCairo][MediaFoundation] The main thread can sometimes be blocked forever when ending a media session.
https://bugs.webkit.org/show_bug.cgi?id=151387

Reviewed by Alex Christensen.

This happens because the main thread is waiting for the sample scheduler thread to finish,
but sometimes it never does. This can be resolved by emptying the scheduler's sample queue
before requesting the scheduler thread to finish. This will make sure the scheduler thread
returns to its main loop quickly, and can handle the termination request.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::stopScheduler):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp