bug 1228484 throw instead of capturing a second stream to a different graph r=roc

--HG--
extra : rebase_source : d1795f2afc413612666a5eee62d27d68e2337407
This commit is contained in:
Karl Tomlinson 2015-12-04 01:30:46 +13:00
Родитель 503849e75c
Коммит 63528b5b3f
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -1883,6 +1883,11 @@ HTMLMediaElement::CaptureStreamInternal(bool aFinishWhenEnded,
aGraph = MediaStreamGraph::GetInstance(graphDriverType, mAudioChannel);
}
if (!mOutputStreams.IsEmpty() &&
aGraph != mOutputStreams[0].mStream->GetInputStream()->Graph()) {
return nullptr;
}
OutputMediaStream* out = mOutputStreams.AppendElement();
out->mStream = DOMMediaStream::CreateTrackUnionStream(window, aGraph);
RefPtr<nsIPrincipal> principal = GetCurrentPrincipal();