mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 845741: Set mUpdateFinished under lock r=roc
This commit is contained in:
parent
bb2bea552c
commit
a15d1c6211
@ -1748,6 +1748,7 @@ SourceMediaStream::AdvanceKnownTracksTime(StreamTime aKnownTime)
|
||||
void
|
||||
SourceMediaStream::FinishWithLockHeld()
|
||||
{
|
||||
mMutex.AssertCurrentThreadOwns();
|
||||
mUpdateFinished = true;
|
||||
if (!mDestroyed) {
|
||||
GraphImpl()->EnsureNextIteration();
|
||||
@ -1757,12 +1758,10 @@ SourceMediaStream::FinishWithLockHeld()
|
||||
void
|
||||
SourceMediaStream::EndAllTrackAndFinish()
|
||||
{
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
for (uint32_t i = 0; i < mUpdateTracks.Length(); ++i) {
|
||||
SourceMediaStream::TrackData* data = &mUpdateTracks[i];
|
||||
data->mCommands |= TRACK_END;
|
||||
}
|
||||
MutexAutoLock lock(mMutex);
|
||||
for (uint32_t i = 0; i < mUpdateTracks.Length(); ++i) {
|
||||
SourceMediaStream::TrackData* data = &mUpdateTracks[i];
|
||||
data->mCommands |= TRACK_END;
|
||||
}
|
||||
FinishWithLockHeld();
|
||||
// we will call NotifyFinished() to let GetUserMedia know
|
||||
|
Loading…
Reference in New Issue
Block a user