mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1205470: [MSE] Remove assertion. r=cpearce
Can also remove mInitDone member as that information is redundant with the init promise being present
This commit is contained in:
parent
eb5a4e3717
commit
3a47518da0
@ -27,7 +27,6 @@ using media::TimeIntervals;
|
||||
MediaSourceDemuxer::MediaSourceDemuxer()
|
||||
: mTaskQueue(new TaskQueue(GetMediaThreadPool(MediaThreadType::PLAYBACK),
|
||||
/* aSupportsTailDispatch = */ true))
|
||||
, mInitDone(false)
|
||||
, mMonitor("MediaSourceDemuxer")
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
@ -46,7 +45,6 @@ MediaSourceDemuxer::AttemptInit()
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
|
||||
if (ScanSourceBuffersForContent()) {
|
||||
mInitDone = true;
|
||||
return InitPromise::CreateAndResolve(NS_OK, __func__);
|
||||
}
|
||||
|
||||
@ -60,12 +58,10 @@ void MediaSourceDemuxer::NotifyDataArrived(uint32_t aLength, int64_t aOffset)
|
||||
nsRefPtr<MediaSourceDemuxer> self = this;
|
||||
nsCOMPtr<nsIRunnable> task =
|
||||
NS_NewRunnableFunction([self] () {
|
||||
if (self->mInitDone) {
|
||||
if (self->mInitPromise.IsEmpty()) {
|
||||
return;
|
||||
}
|
||||
MOZ_ASSERT(!self->mInitPromise.IsEmpty());
|
||||
if (self->ScanSourceBuffersForContent()) {
|
||||
self->mInitDone = true;
|
||||
self->mInitPromise.ResolveIfExists(NS_OK, __func__);
|
||||
}
|
||||
});
|
||||
|
@ -74,7 +74,6 @@ private:
|
||||
nsTArray<nsRefPtr<TrackBuffersManager>> mSourceBuffers;
|
||||
|
||||
MozPromiseHolder<InitPromise> mInitPromise;
|
||||
bool mInitDone;
|
||||
|
||||
// Monitor to protect members below across multiple threads.
|
||||
mutable Monitor mMonitor;
|
||||
|
Loading…
Reference in New Issue
Block a user