зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1096597 - Switch to buffering mode on WAITING_FOR_DATA. r=cpearce
This commit is contained in:
Родитель
e2dd17c59b
Коммит
19f7e785c2
|
@ -910,7 +910,6 @@ NS_IMETHODIMP MediaDecoder::Observe(nsISupports *aSubjet,
|
|||
MediaDecoder::Statistics
|
||||
MediaDecoder::GetStatistics()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread() || OnStateMachineThread());
|
||||
Statistics result;
|
||||
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
|
|
|
@ -821,9 +821,15 @@ MediaDecoderStateMachine::OnNotDecoded(MediaData::Type aType,
|
|||
return;
|
||||
}
|
||||
|
||||
// If the decoder is waiting for data, there's nothing more to do after
|
||||
// clearing the pending request.
|
||||
// If the decoder is waiting for data, we need to make sure that the requests
|
||||
// are cleared, which happened above. Additionally, if we're out of decoded
|
||||
// samples, we need to switch to buffering mode.
|
||||
if (aReason == RequestSampleCallback::WAITING_FOR_DATA) {
|
||||
bool outOfSamples = isAudio ? !AudioQueue().GetSize() : !VideoQueue().GetSize();
|
||||
if (outOfSamples) {
|
||||
StartBuffering();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче