mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1129263 - Part 3. Add tracks atomically when capturing from decoder. r=roc,jesup
This commit is contained in:
parent
d61e1fd8f3
commit
7c048a5765
@ -407,7 +407,8 @@ void MediaDecoderStateMachine::SendStreamData()
|
||||
if (mInfo.HasAudio()) {
|
||||
TrackID audioTrackId = mInfo.mAudio.mTrackInfo.mOutputId;
|
||||
AudioSegment* audio = new AudioSegment();
|
||||
mediaStream->AddAudioTrack(audioTrackId, mInfo.mAudio.mRate, 0, audio);
|
||||
mediaStream->AddAudioTrack(audioTrackId, mInfo.mAudio.mRate, 0, audio,
|
||||
SourceMediaStream::ADDTRACK_QUEUED);
|
||||
stream->mStream->DispatchWhenNotEnoughBuffered(audioTrackId,
|
||||
GetStateMachineThread(), GetWakeDecoderRunnable());
|
||||
stream->mNextAudioTime = mStartTime + stream->mInitialTime;
|
||||
@ -415,7 +416,8 @@ void MediaDecoderStateMachine::SendStreamData()
|
||||
if (mInfo.HasVideo()) {
|
||||
TrackID videoTrackId = mInfo.mVideo.mTrackInfo.mOutputId;
|
||||
VideoSegment* video = new VideoSegment();
|
||||
mediaStream->AddTrack(videoTrackId, 0, video);
|
||||
mediaStream->AddTrack(videoTrackId, 0, video,
|
||||
SourceMediaStream::ADDTRACK_QUEUED);
|
||||
stream->mStream->DispatchWhenNotEnoughBuffered(videoTrackId,
|
||||
GetStateMachineThread(), GetWakeDecoderRunnable());
|
||||
|
||||
@ -425,6 +427,7 @@ void MediaDecoderStateMachine::SendStreamData()
|
||||
// into MediaDecoderStateMachine.
|
||||
stream->mNextVideoTime = mStartTime + stream->mInitialTime;
|
||||
}
|
||||
mediaStream->FinishAddTracks();
|
||||
stream->mStreamInitialized = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user