mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 960059 - When an HTMLMediaElement outputs to a MediaStream, make sure to install the refill callback in any case. r=roc
--HG-- extra : rebase_source : a690159d6395ed7bab2a053bbb1cc65e11bb8be6
This commit is contained in:
parent
10cca6b922
commit
38770e3cf4
@ -659,10 +659,14 @@ void MediaDecoderStateMachine::SendStreamData()
|
||||
if (mInfo.HasAudio()) {
|
||||
AudioSegment* audio = new AudioSegment();
|
||||
mediaStream->AddTrack(TRACK_AUDIO, mInfo.mAudio.mRate, 0, audio);
|
||||
stream->mStream->DispatchWhenNotEnoughBuffered(TRACK_AUDIO,
|
||||
GetStateMachineThread(), GetWakeDecoderRunnable());
|
||||
}
|
||||
if (mInfo.HasVideo()) {
|
||||
VideoSegment* video = new VideoSegment();
|
||||
mediaStream->AddTrack(TRACK_VIDEO, RATE_VIDEO, 0, video);
|
||||
stream->mStream->DispatchWhenNotEnoughBuffered(TRACK_VIDEO,
|
||||
GetStateMachineThread(), GetWakeDecoderRunnable());
|
||||
}
|
||||
stream->mStreamInitialized = true;
|
||||
}
|
||||
|
@ -2200,7 +2200,9 @@ SourceMediaStream::DispatchWhenNotEnoughBuffered(TrackID aID,
|
||||
}
|
||||
|
||||
if (data->mHaveEnough) {
|
||||
data->mDispatchWhenNotEnough.AppendElement()->Init(aSignalThread, aSignalRunnable);
|
||||
if (data->mDispatchWhenNotEnough.IsEmpty()) {
|
||||
data->mDispatchWhenNotEnough.AppendElement()->Init(aSignalThread, aSignalRunnable);
|
||||
}
|
||||
} else {
|
||||
aSignalThread->Dispatch(aSignalRunnable, 0);
|
||||
}
|
||||
|
@ -672,7 +672,7 @@ public:
|
||||
* Ensures that aSignalRunnable will be dispatched to aSignalThread
|
||||
* when we don't have enough buffered data in the track (which could be
|
||||
* immediately). Will dispatch the runnable immediately if the track
|
||||
* does not exist.
|
||||
* does not exist. No op if a runnable is already present for this track.
|
||||
*/
|
||||
void DispatchWhenNotEnoughBuffered(TrackID aID,
|
||||
nsIThread* aSignalThread, nsIRunnable* aSignalRunnable);
|
||||
|
Loading…
Reference in New Issue
Block a user