Bug 1183573: P1. Properly shutdown demuxers. r=gerald

This commit is contained in:
Jean-Yves Avenard 2015-07-14 20:51:49 +10:00
parent d560547398
commit 51fee7c5fb
2 changed files with 10 additions and 1 deletions

View File

@ -109,6 +109,7 @@ TrackBuffersManager::TrackBuffersManager(dom::SourceBuffer* aParent, MediaSource
TrackBuffersManager::~TrackBuffersManager()
{
ShutdownDemuxers();
}
bool
@ -733,7 +734,7 @@ TrackBuffersManager::ScheduleSegmentParserLoop()
}
void
TrackBuffersManager::CreateDemuxerforMIMEType()
TrackBuffersManager::ShutdownDemuxers()
{
if (mVideoTracks.mDemuxer) {
mVideoTracks.mDemuxer->BreakCycles();
@ -744,6 +745,13 @@ TrackBuffersManager::CreateDemuxerforMIMEType()
mAudioTracks.mDemuxer = nullptr;
}
mInputDemuxer = nullptr;
}
void
TrackBuffersManager::CreateDemuxerforMIMEType()
{
ShutdownDemuxers();
if (mType.LowerCaseEqualsLiteral("video/webm") || mType.LowerCaseEqualsLiteral("audio/webm")) {
NS_WARNING("Waiting on WebMDemuxer");
// mInputDemuxer = new WebMDemuxer(mCurrentInputBuffer);

View File

@ -102,6 +102,7 @@ private:
void SegmentParserLoop();
void AppendIncomingBuffers();
void InitializationSegmentReceived();
void ShutdownDemuxers();
void CreateDemuxerforMIMEType();
void NeedMoreData();
void RejectAppend(nsresult aRejectValue, const char* aName);