зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1453127 - Clear output streams on shutdown. r=jya
This commit is contained in:
Родитель
6c6e70fcbc
Коммит
9d5b27393d
|
@ -3448,6 +3448,10 @@ MediaDecoderStateMachine::FinishDecodeFirstFrame()
|
||||||
RefPtr<ShutdownPromise>
|
RefPtr<ShutdownPromise>
|
||||||
MediaDecoderStateMachine::BeginShutdown()
|
MediaDecoderStateMachine::BeginShutdown()
|
||||||
{
|
{
|
||||||
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
|
if (mOutputStreamManager) {
|
||||||
|
mOutputStreamManager->Clear();
|
||||||
|
}
|
||||||
return InvokeAsync(OwnerThread(), this, __func__,
|
return InvokeAsync(OwnerThread(), this, __func__,
|
||||||
&MediaDecoderStateMachine::Shutdown);
|
&MediaDecoderStateMachine::Shutdown);
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,13 @@ OutputStreamManager::Remove(MediaStream* aStream)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
OutputStreamManager::Clear()
|
||||||
|
{
|
||||||
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
|
mStreams.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
TrackID
|
TrackID
|
||||||
OutputStreamManager::NextAvailableTrackIDFor(MediaStream* aOutputStream) const
|
OutputStreamManager::NextAvailableTrackIDFor(MediaStream* aOutputStream) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,6 +59,8 @@ public:
|
||||||
bool aFinishWhenEnded);
|
bool aFinishWhenEnded);
|
||||||
// Remove the output stream from the collection.
|
// Remove the output stream from the collection.
|
||||||
void Remove(MediaStream* aStream);
|
void Remove(MediaStream* aStream);
|
||||||
|
// Clear all output streams from the collection.
|
||||||
|
void Clear();
|
||||||
// The next TrackID that will not cause a collision in aOutputStream.
|
// The next TrackID that will not cause a collision in aOutputStream.
|
||||||
TrackID NextAvailableTrackIDFor(MediaStream* aOutputStream) const;
|
TrackID NextAvailableTrackIDFor(MediaStream* aOutputStream) const;
|
||||||
// Return true if the collection empty.
|
// Return true if the collection empty.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче