From dc6019613e5fe3faec66dfc720477ff27ed2ac5a Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Mon, 18 May 2015 15:41:22 +1000 Subject: [PATCH] Bug 1156708: Part3. Disable audio track when using combined track sourcebuffer. r=kentuckyfriedtakahe This is an unsupported configuration. We currently only whitelist MSE clients using separate audio and video tracks. --- dom/media/mediasource/MediaSourceReader.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dom/media/mediasource/MediaSourceReader.cpp b/dom/media/mediasource/MediaSourceReader.cpp index e488cdfb33c..9b494c8fddc 100644 --- a/dom/media/mediasource/MediaSourceReader.cpp +++ b/dom/media/mediasource/MediaSourceReader.cpp @@ -1134,6 +1134,11 @@ MediaSourceReader::ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags) return NS_ERROR_FAILURE; } + if (mAudioTrack == mVideoTrack) { + NS_WARNING("Combined audio/video sourcebuffer, this is an unsupported " + "configuration, only using video track"); + mAudioTrack = nullptr; + } if (mAudioTrack) { MOZ_ASSERT(mAudioTrack->IsReady()); mAudioSourceDecoder = mAudioTrack->Decoders()[0];