mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backing out media-cache, bug 475441
This commit is contained in:
commit
5dc4d3f8f1
@ -1399,8 +1399,6 @@ nsresult nsOggDecoder::Play()
|
|||||||
mNextState = PLAY_STATE_PLAYING;
|
mNextState = PLAY_STATE_PLAYING;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
if (mPlayState == PLAY_STATE_ENDED)
|
|
||||||
return Seek(0);
|
|
||||||
|
|
||||||
ChangeState(PLAY_STATE_PLAYING);
|
ChangeState(PLAY_STATE_PLAYING);
|
||||||
|
|
||||||
@ -1420,11 +1418,7 @@ nsresult nsOggDecoder::Seek(float aTime)
|
|||||||
// above will result in the new seek occurring when the current seek
|
// above will result in the new seek occurring when the current seek
|
||||||
// completes.
|
// completes.
|
||||||
if (mPlayState != PLAY_STATE_SEEKING) {
|
if (mPlayState != PLAY_STATE_SEEKING) {
|
||||||
if (mPlayState == PLAY_STATE_ENDED) {
|
mNextState = mPlayState;
|
||||||
mNextState = PLAY_STATE_PLAYING;
|
|
||||||
} else {
|
|
||||||
mNextState = mPlayState;
|
|
||||||
}
|
|
||||||
ChangeState(PLAY_STATE_SEEKING);
|
ChangeState(PLAY_STATE_SEEKING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1662,8 +1656,7 @@ void nsOggDecoder::PlaybackEnded()
|
|||||||
if (mShuttingDown || mPlayState == nsOggDecoder::PLAY_STATE_SEEKING)
|
if (mShuttingDown || mPlayState == nsOggDecoder::PLAY_STATE_SEEKING)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ChangeState(PLAY_STATE_ENDED);
|
Stop();
|
||||||
|
|
||||||
if (mElement) {
|
if (mElement) {
|
||||||
mElement->PlaybackEnded();
|
mElement->PlaybackEnded();
|
||||||
}
|
}
|
||||||
@ -1874,6 +1867,20 @@ void nsOggDecoder::ChangeState(PlayState aState)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mPlayState == PLAY_STATE_ENDED &&
|
||||||
|
aState != PLAY_STATE_SHUTDOWN) {
|
||||||
|
// If we've completed playback then the decode and display threads
|
||||||
|
// have been shutdown. To honor the state change request we need
|
||||||
|
// to reload the resource and restart the threads.
|
||||||
|
// Like seeking, this will require opening a new channel, which means
|
||||||
|
// we may not actually get the same resource --- a server may send
|
||||||
|
// us something different.
|
||||||
|
mNextState = aState;
|
||||||
|
mPlayState = PLAY_STATE_LOADING;
|
||||||
|
Load(mURI, nsnull, nsnull);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mPlayState = aState;
|
mPlayState = aState;
|
||||||
switch (aState) {
|
switch (aState) {
|
||||||
case PLAY_STATE_PAUSED:
|
case PLAY_STATE_PAUSED:
|
||||||
|
Loading…
Reference in New Issue
Block a user