mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 889233 - Fix transition from dormant to other state. r=doublec
This commit is contained in:
parent
4fb77bcb31
commit
7eb627a7fa
@ -727,6 +727,9 @@ void MediaDecoder::MetadataLoaded(int aChannels, int aRate, bool aHasAudio, bool
|
||||
|
||||
{
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
if (mPlayState == PLAY_STATE_LOADING && mIsDormant) {
|
||||
mIsDormant = false;
|
||||
}
|
||||
mDuration = mDecoderStateMachine ? mDecoderStateMachine->GetDuration() : -1;
|
||||
// Duration has changed so we should recompute playback rate
|
||||
UpdatePlaybackRate();
|
||||
@ -1144,7 +1147,8 @@ void MediaDecoder::ChangeState(PlayState aState)
|
||||
mNextState = PLAY_STATE_PAUSED;
|
||||
}
|
||||
|
||||
if ((mPlayState == PLAY_STATE_LOADING && mIsDormant) || mPlayState == PLAY_STATE_SHUTDOWN) {
|
||||
if ((mPlayState == PLAY_STATE_LOADING && mIsDormant && aState != PLAY_STATE_SHUTDOWN) ||
|
||||
mPlayState == PLAY_STATE_SHUTDOWN) {
|
||||
GetReentrantMonitor().NotifyAll();
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user