mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Bug 576539 - Only reset playback when seeking to a new position. r=kinetik a=blocking2.0
This commit is contained in:
parent
35e03b736e
commit
9b0fd1aae8
@ -918,10 +918,6 @@ nsresult nsBuiltinDecoderStateMachine::Run()
|
||||
PRInt64 seekTime = mSeekTime;
|
||||
mDecoder->StopProgressUpdates();
|
||||
|
||||
StopPlayback(AUDIO_SHUTDOWN);
|
||||
StopDecodeThreads();
|
||||
ResetPlayback();
|
||||
|
||||
// SeekingStarted will do a UpdateReadyStateForData which will
|
||||
// inform the element and its users that we have no frames
|
||||
// to display
|
||||
@ -932,6 +928,12 @@ nsresult nsBuiltinDecoderStateMachine::Run()
|
||||
NS_DispatchToMainThread(startEvent, NS_DISPATCH_SYNC);
|
||||
}
|
||||
if (mCurrentFrameTime != mSeekTime - mStartTime) {
|
||||
// The seek target is different than the current playback position,
|
||||
// we'll need to seek the playback position, so shutdown our decode
|
||||
// and audio threads.
|
||||
StopPlayback(AUDIO_SHUTDOWN);
|
||||
StopDecodeThreads();
|
||||
ResetPlayback();
|
||||
nsresult res;
|
||||
{
|
||||
MonitorAutoExit exitMon(mDecoder->GetMonitor());
|
||||
|
Loading…
Reference in New Issue
Block a user