diff options
author | Moonchild <moonchild@palemoon.org> | 2022-02-10 11:09:42 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-03 01:13:14 +0200 |
commit | 7aaeefb88d16b0ba23253e320da53677445efa78 (patch) | |
tree | a1bdb884e7e200ae07ee377b10ec4b09e4bbe86f | |
parent | 0a84c9b4e4719d775a573e73e2fb2128dee8ee56 (diff) | |
download | uxp-7aaeefb88d16b0ba23253e320da53677445efa78.tar.gz |
[DOM media] Adjust lock scope in MediaSourceDemuxer
-rw-r--r-- | dom/media/mediasource/MediaSourceDemuxer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/dom/media/mediasource/MediaSourceDemuxer.cpp b/dom/media/mediasource/MediaSourceDemuxer.cpp index 73950e1a87..616693720a 100644 --- a/dom/media/mediasource/MediaSourceDemuxer.cpp +++ b/dom/media/mediasource/MediaSourceDemuxer.cpp @@ -465,10 +465,12 @@ MediaSourceTrackDemuxer::DoGetSamples(int32_t aNumSamples) } RefPtr<SamplesHolder> samples = new SamplesHolder; samples->mSamples.AppendElement(sample); - if (mNextRandomAccessPoint.ToMicroseconds() <= sample->mTime) { + { MonitorAutoLock mon(mMonitor); - mNextRandomAccessPoint = - mManager->GetNextRandomAccessPoint(mType, MediaSourceDemuxer::EOS_FUZZ); + if (mNextRandomAccessPoint.ToMicroseconds() <= sample->mTime) { + mNextRandomAccessPoint = + mManager->GetNextRandomAccessPoint(mType, MediaSourceDemuxer::EOS_FUZZ); + } } return SamplesPromise::CreateAndResolve(samples, __func__); } |