mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Switch to an explicit limit of 0 for splitting on RTSP fmtp parameters
This commit is contained in:
parent
6f67cb839c
commit
0921efab3e
1 changed files with 2 additions and 2 deletions
|
|
@ -314,8 +314,8 @@ import java.util.HashMap;
|
||||||
|
|
||||||
// Format of the parameter: RFC3640 Section 4.4.1:
|
// Format of the parameter: RFC3640 Section 4.4.1:
|
||||||
// <parameter name>=<value>[; <parameter name>=<value>].
|
// <parameter name>=<value>[; <parameter name>=<value>].
|
||||||
// Split with implicit limit of 0 to handle an optional trailing semicolon.
|
// Split with an explicit limit of 0 to handle an optional trailing semicolon.
|
||||||
String[] parameters = fmtpComponents[1].split(";\\s?");
|
String[] parameters = fmtpComponents[1].split(";\\s?", /* limit= */ 0);
|
||||||
ImmutableMap.Builder<String, String> formatParametersBuilder = new ImmutableMap.Builder<>();
|
ImmutableMap.Builder<String, String> formatParametersBuilder = new ImmutableMap.Builder<>();
|
||||||
for (String parameter : parameters) {
|
for (String parameter : parameters) {
|
||||||
// The parameter values can bear equal signs, so splitAtFirst must be used.
|
// The parameter values can bear equal signs, so splitAtFirst must be used.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue