Bug 686942: respect pause state when seeking to end and beginning of videos - r=kinetik

--HG--
extra : rebase_source : 9d698ae2e8731040fa8f40b90164889b5a8b5e23
This commit is contained in:
Chris Double 2011-09-27 15:22:09 +13:00
Родитель 31efcd6b2a
Коммит 2f787f6ad6
1 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -353,12 +353,11 @@ nsresult nsBuiltinDecoder::Seek(double aTime)
// above will result in the new seek occurring when the current seek
// completes.
if (mPlayState != PLAY_STATE_SEEKING) {
if (mPlayState == PLAY_STATE_ENDED) {
mNextState = PLAY_STATE_PLAYING;
}
else {
mNextState = mPlayState;
PRBool paused = PR_FALSE;
if (mElement) {
mElement->GetPaused(&paused);
}
mNextState = paused ? PLAY_STATE_PAUSED : PLAY_STATE_PLAYING;
PinForSeek();
ChangeState(PLAY_STATE_SEEKING);
}