From 191ab1fe7cacce3043305464f7379dcd51c13b96 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 22 Aug 2013 12:26:54 -0400 Subject: [PATCH] Bug 906105 - Store external 0-based sdpMLineIndex rather than internal 1-based one. r=ehugg --- dom/media/PeerConnection.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dom/media/PeerConnection.js b/dom/media/PeerConnection.js index 0d6ea842cf05..e2d505dfe754 100644 --- a/dom/media/PeerConnection.js +++ b/dom/media/PeerConnection.js @@ -134,7 +134,7 @@ RTCIceCandidate.prototype = { __init: function(dict) { this.candidate = dict.candidate; this.sdpMid = dict.sdpMid; - this.sdpMLineIndex = ("sdpMLineIndex" in dict)? dict.sdpMLineIndex+1 : null; + this.sdpMLineIndex = ("sdpMLineIndex" in dict)? dict.sdpMLineIndex : null; } }; @@ -691,7 +691,8 @@ RTCPeerConnection.prototype = { this._queueOrRun({ func: this._getPC().addIceCandidate, - args: [cand.candidate, cand.sdpMid || "", cand.sdpMLineIndex], + args: [cand.candidate, cand.sdpMid || "", + (cand.sdpMLineIndex === null)? 0 : cand.sdpMLineIndex + 1], wait: true }); },