Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Clear source buffers when detaching from media decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
ferjm committed Dec 18, 2017
1 parent dab0f5c commit 27a1019
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gecko-media/gecko/glue/MediaSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ void
MediaSource::Detach()
{
MOZ_ASSERT(NS_IsMainThread());
CALLBACK_GUARD_VOID(ClearActiveSourceBuffers);
CALLBACK_GUARD_VOID(ClearSourceBuffers);
// TODO MOZ_RELEASE_ASSERT(mCompletionPromises.IsEmpty());
MSE_DEBUG("mDecoder=%p owner=%p",
mDecoder.get(), mDecoder ? mDecoder->GetOwner() : nullptr);
Expand All @@ -165,8 +167,8 @@ MediaSource::Detach()
return;
}
SetReadyState(MediaSourceReadyState::Closed);
// mImpl.ClearActiveSourceBuffers();
// mImpl.ClearSourceBuffers();
CALLBACK_CALL(ClearActiveSourceBuffers);
CALLBACK_CALL(ClearSourceBuffers);
mDecoder->DetachMediaSource();
mDecoder = nullptr;
}
Expand Down

0 comments on commit 27a1019

Please sign in to comment.