diff options
author | Jenkins2 <jenkins2@gerrit.asterisk.org> | 2017-05-24 11:02:24 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-05-24 11:02:24 -0500 |
commit | 22000090991543132247e6dfca8255b66ca239ba (patch) | |
tree | 5146e9f51f9b7b90bbb78abf276dcdcd675eb4c2 | |
parent | faab0580145940f7be8ab72980aa8e69dad376fb (diff) | |
parent | 8ae0227cf33ee6abfdaa29b90864d52faacc5d2c (diff) |
Merge "res_format_attr_h26x: Trim blanks in fmtp attributes"
-rw-r--r-- | res/res_format_attr_h263.c | 2 | ||||
-rw-r--r-- | res/res_format_attr_h264.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/res/res_format_attr_h263.c b/res/res_format_attr_h263.c index 139fbf17a..a32f40f7d 100644 --- a/res/res_format_attr_h263.c +++ b/res/res_format_attr_h263.c @@ -156,6 +156,8 @@ static struct ast_format *h263_parse_sdp_fmtp(const struct ast_format *format, c while ((attrib = strsep(&attribs, ";"))) { unsigned int val, val2 = 0, val3 = 0, val4 = 0; + attrib = ast_strip(attrib); + if (sscanf(attrib, "SQCIF=%30u", &val) == 1) { attr->SQCIF = val; } else if (sscanf(attrib, "QCIF=%30u", &val) == 1) { diff --git a/res/res_format_attr_h264.c b/res/res_format_attr_h264.c index 29d495bc7..fa3339543 100644 --- a/res/res_format_attr_h264.c +++ b/res/res_format_attr_h264.c @@ -184,6 +184,8 @@ static struct ast_format *h264_parse_sdp_fmtp(const struct ast_format *format, c unsigned int val; unsigned long int val2; + attrib = ast_strip(attrib); + if (sscanf(attrib, "profile-level-id=%lx", &val2) == 1) { attr->PROFILE_IDC = ((val2 >> 16) & 0xFF); attr->PROFILE_IOP = ((val2 >> 8) & 0xFF); |