Commit 86f0ea2e authored by jiayl's avatar jiayl Committed by Commit bot

Bail out in forceIsac16KInSdp if there is no audio content in the SDP.

BUG=

Review URL: https://codereview.chromium.org/554753003

Cr-Commit-Position: refs/heads/master@{#293971}
parent f078dc13
......@@ -27,11 +27,15 @@
var maybeForceIsac16K = function(sdp) { return sdp; };
function forceIsac16KInSdp() {
maybeForceIsac16K = function(sdp) {
if (sdp.search('m=audio') == -1)
return sdp;
sdp = sdp.replace(/m=audio (\d+) RTP\/SAVPF.*\r\n/g,
'm=audio $1 RTP/SAVPF 103 126\r\n');
sdp = sdp.replace('a=fmtp:111 minptime=10', 'a=fmtp:103 minptime=10');
if (sdp.search('a=rtpmap:103 ISAC/16000') == -1)
failTest('Missing iSAC 16K codec on Android; cannot force codec.');
return sdp;
};
sendValueToTest('isac-forced');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment