Bug 817429: Accept candidate messages that are zero numbered r=jesup
authorAdam Roach <adam@nostrum.com>
Wed, 21 Nov 2012 12:48:32 -0600
changeset 116399 08e0e08620063d702eb363bd6d9afb943da67afe
parent 116398 aec01763cb6b54241eb96878ee606b247ae215f9
child 116400 59f60da956f252d41c26fa8775d0b287ec98dc7a
push id24049
push userryanvm@gmail.com
push dateWed, 19 Dec 2012 00:32:38 +0000
treeherdermozilla-central@287a7d7cf7f0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs817429
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 817429: Accept candidate messages that are zero numbered r=jesup
dom/media/PeerConnection.js
--- a/dom/media/PeerConnection.js
+++ b/dom/media/PeerConnection.js
@@ -128,17 +128,18 @@ IceCandidate.prototype = {
   constructor: function(win, candidateInitDict) {
     if (this._win) {
       throw new Error("Constructor already called");
     }
     this._win = win;
     if (candidateInitDict !== undefined) {
       this.candidate = candidateInitDict.candidate || null;
       this.sdpMid = candidateInitDict.sdbMid || null;
-      this.sdpMLineIndex = candidateInitDict.sdpMLineIndex || null;
+      this.sdpMLineIndex = candidateInitDict.sdpMLineIndex === null ?
+            null : candidateInitDict.sdpMLineIndex + 1;
     } else {
       this.candidate = this.sdpMid = this.sdpMLineIndex = null;
     }
   }
 };
 
 function SessionDescription(type, sdp) {
   this.type = type;