mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 04:27:37 +00:00
Bug 1115505 - keep decoding to ensure the stream is initialized in the decode-to-stream case. r=roc
This commit is contained in:
parent
05404cf3f4
commit
1bb19d6931
@ -531,6 +531,13 @@ bool MediaDecoderStateMachine::HaveEnoughDecodedAudio(int64_t aAmpleAudioUSecs)
|
||||
}
|
||||
|
||||
DecodedStreamData* stream = mDecoder->GetDecodedStream();
|
||||
|
||||
// Since stream is initialized in SendStreamData() which is called when
|
||||
// audio/video samples are received, we need to keep decoding to ensure
|
||||
// the stream is initialized.
|
||||
if (stream && !stream->mStreamInitialized) {
|
||||
return false;
|
||||
}
|
||||
if (stream && stream->mStreamInitialized && !stream->mHaveSentFinishAudio) {
|
||||
if (!stream->mStream->HaveEnoughBuffered(kAudioTrack)) {
|
||||
return false;
|
||||
@ -551,6 +558,11 @@ bool MediaDecoderStateMachine::HaveEnoughDecodedVideo()
|
||||
}
|
||||
|
||||
DecodedStreamData* stream = mDecoder->GetDecodedStream();
|
||||
|
||||
if (stream && !stream->mStreamInitialized) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (stream && stream->mStreamInitialized && !stream->mHaveSentFinishVideo) {
|
||||
if (!stream->mStream->HaveEnoughBuffered(kVideoTrack)) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user