Bug 906105 - Store external 0-based sdpMLineIndex rather than internal 1-based one. r=ehugg

This commit is contained in:
Jan-Ivar Bruaroey 2013-08-22 12:26:54 -04:00
Родитель 9df2567d9f
Коммит 191ab1fe7c
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -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
});
},