зеркало из https://github.com/mozilla/gecko-dev.git
Bug 693391 - Pin nsMediaStream while determining buffered ranges. r=roc
This commit is contained in:
Родитель
740652ece1
Коммит
3bc0fa6ae7
|
@ -1668,3 +1668,12 @@ void nsBuiltinDecoderStateMachine::StartBuffering()
|
|||
stats.mPlaybackRate/1024, stats.mPlaybackRateReliable ? "" : " (unreliable)",
|
||||
stats.mDownloadRate/1024, stats.mDownloadRateReliable ? "" : " (unreliable)"));
|
||||
}
|
||||
|
||||
nsresult nsBuiltinDecoderStateMachine::GetBuffered(nsTimeRanges* aBuffered) {
|
||||
nsMediaStream* stream = mDecoder->GetCurrentStream();
|
||||
NS_ENSURE_TRUE(stream, NS_ERROR_FAILURE);
|
||||
stream->Pin();
|
||||
nsresult res = mReader->GetBuffered(aBuffered, mStartTime);
|
||||
stream->Unpin();
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -235,9 +235,7 @@ public:
|
|||
// Accessed on state machine, audio, main, and AV thread.
|
||||
State mState;
|
||||
|
||||
nsresult GetBuffered(nsTimeRanges* aBuffered) {
|
||||
return mReader->GetBuffered(aBuffered, mStartTime);
|
||||
}
|
||||
nsresult GetBuffered(nsTimeRanges* aBuffered);
|
||||
|
||||
void NotifyDataArrived(const char* aBuffer, PRUint32 aLength, PRUint32 aOffset) {
|
||||
NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
|
||||
|
|
Загрузка…
Ссылка в новой задаче