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.
This commit is contained in:
Jean-Yves Avenard 2015-05-18 15:41:22 +10:00
parent 92fc890f99
commit dc6019613e

View File

@ -1134,6 +1134,11 @@ MediaSourceReader::ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags)
return NS_ERROR_FAILURE; 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) { if (mAudioTrack) {
MOZ_ASSERT(mAudioTrack->IsReady()); MOZ_ASSERT(mAudioTrack->IsReady());
mAudioSourceDecoder = mAudioTrack->Decoders()[0]; mAudioSourceDecoder = mAudioTrack->Decoders()[0];