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 125501 08e0e08620063d702eb363bd6d9afb943da67afe
parent 125500 aec01763cb6b54241eb96878ee606b247ae215f9
child 125502 59f60da956f252d41c26fa8775d0b287ec98dc7a
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [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;