mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 496581. If we seek to the end, enter COMPLETED state instead of trying to decode more. r=doublec
--HG-- extra : rebase_source : 16d4e604e40384221b148bf8939339179a93d96c
This commit is contained in:
parent
679ac11f8b
commit
f600456032
@ -1645,15 +1645,17 @@ nsresult nsOggDecodeStateMachine::Run()
|
||||
// if we need to seek again.
|
||||
LOG(PR_LOG_DEBUG, ("Changed state from SEEKING (to %f) to DECODING", seekTime));
|
||||
mState = DECODER_STATE_DECODING;
|
||||
mon.NotifyAll();
|
||||
|
||||
mon.Exit();
|
||||
nsCOMPtr<nsIRunnable> stopEvent;
|
||||
if (mDecodedFrames.GetCount() > 1) {
|
||||
stopEvent = NS_NEW_RUNNABLE_METHOD(nsOggDecoder, mDecoder, SeekingStopped);
|
||||
mState = DECODER_STATE_DECODING;
|
||||
} else {
|
||||
stopEvent = NS_NEW_RUNNABLE_METHOD(nsOggDecoder, mDecoder, SeekingStoppedAtEnd);
|
||||
mState = DECODER_STATE_COMPLETED;
|
||||
}
|
||||
mon.NotifyAll();
|
||||
|
||||
mon.Exit();
|
||||
NS_DispatchToMainThread(stopEvent, NS_DISPATCH_SYNC);
|
||||
mon.Enter();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user