Bug 803782: Reset found flag before enumerating audio devices; r=jesup

This commit is contained in:
Anant Narayanan 2012-11-07 06:51:38 -08:00
parent fe69b25bf8
commit 109054e57c
3 changed files with 53 additions and 0 deletions

View File

@ -504,6 +504,8 @@ public:
}
LOG(("Selected video device"));
}
found = false;
if (mAudio) {
nsTArray<nsRefPtr<MediaEngineAudioSource> > audioSources;
mBackend->EnumerateAudioDevices(&audioSources);

View File

@ -0,0 +1,50 @@
<html>
<head>
<title></title>
<script type="text/javascript">
function boom() {
function err(e) { if (console) { console.log(err); } }
var v0 = mozRTCPeerConnection();
var v1 = mozRTCPeerConnection();
var v2 = mozRTCPeerConnection();
navigator.mozGetUserMedia({audio:true},function(v7) {
v2.addStream(v7);
navigator.mozGetUserMedia({audio:true, video:true},function(v8) {
v1.addStream(v7);
v1.createOffer(function(offer) {
v1.setLocalDescription(offer,function() {
v0.setRemoteDescription(offer,function() {
v0.createAnswer(function(answer) {
v0.setLocalDescription(answer,function() {
v1.setRemoteDescription(answer,function() {
},function() {})
},err)
},function() { v0.close();v1.close();v2.close();})
},err)
},function() {})
},function() {})},function() { v0.close();v1.close();v2.close();});
},function() {});
var v0 = mozRTCPeerConnection();
var v1 = mozRTCPeerConnection();
var v2 = mozRTCPeerConnection();
var v3 = mozRTCPeerConnection();
navigator.mozGetUserMedia({audio:true},function(v8) {
v3.addStream(v8);
v3.createOffer(function(offer) {
v2.setLocalDescription(offer,function() {
v3.setRemoteDescription(offer,function() {
v2.createAnswer(function(answer) {
v2.setLocalDescription(answer,function() {
v1.setRemoteDescription(answer,function() {
},function() { v0.close();v1.close();v2.close();v3.close();})
},function() {})
},function() { v0.close();v1.close();v2.close();v3.close();})
},function() {})
},err)
},err)},err);
}
</script>
<body onload="setTimeout(boom, 100)">
</body>
</html>

View File

@ -2,3 +2,4 @@ pref(media.peerconnection.enabled,true) load 780790.html
pref(media.peerconnection.enabled,true) load 791270.html
pref(media.peerconnection.enabled,true) load 791278.html
pref(media.peerconnection.enabled,true) load 791330.html
pref(media.peerconnection.enabled,true) load 803782.html