Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ exports.parse = function (sdp) {
};

var fmtpReducer = function (acc, expr) {
var s = expr.split('=');
var s = expr.split(/=(.+)/, 2);
if (s.length === 2) {
acc[s[0]] = toIntIfInt(s[1]);
}
Expand Down
2 changes: 1 addition & 1 deletion test/normal.sdp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ a=candidate:0 1 UDP 2113667327 203.0.113.1 54400 typ host
a=candidate:1 2 UDP 2113667326 203.0.113.1 54401 typ host
m=video 55400 RTP/SAVPF 97 98
a=rtpmap:97 H264/90000
a=fmtp:97 profile-level-id=4d0028;packetization-mode=1
a=fmtp:97 profile-level-id=4d0028;packetization-mode=1;sprop-parameter-sets=Z0IAH5WoFAFuQA==,aM48gA==
a=fmtp:111 minptime=10; useinbandfec=1
a=rtpmap:98 VP8/90000
a=rtcp-fb:* nack
Expand Down
2 changes: 2 additions & 0 deletions test/parse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ exports.normalSdp = function (t) {
var vidFmtp = parseFmtpConfig(video.fmtp[0].config);
t.equal(vidFmtp['profile-level-id'], "4d0028", "video fmtp 0 profile-level-id");
t.equal(vidFmtp['packetization-mode'], 1, "video fmtp 0 packetization-mode");
t.equal(vidFmtp['sprop-parameter-sets'], "Z0IAH5WoFAFuQA==,aM48gA==",
"video fmtp 0 sprop-parameter-sets");
t.equal(video.fmtp[1].payload, 111, "video fmtp 1 payload");
var vidFmtp2 = parseFmtpConfig(video.fmtp[1].config);
t.equal(vidFmtp2.minptime, 10, "video fmtp 1 minptime");
Expand Down