[asterisk-commits] res format attr h26x: Trim blanks in fmtp attributes (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 24 11:02:25 CDT 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5691 )
Change subject: res_format_attr_h26x: Trim blanks in fmtp attributes
......................................................................
res_format_attr_h26x: Trim blanks in fmtp attributes
Some devices separate format attributes with a semicolon followed by a
space, so trim blanks before trying to match them.
ASTERISK-27008 #close
Change-Id: Ia44cb2e4fef5c73dc541a29da79cb0e19c22d9cc
---
M res/res_format_attr_h263.c
M res/res_format_attr_h264.c
2 files changed, 4 insertions(+), 0 deletions(-)
Approvals:
George Joseph: Looks good to me, approved; Verified
Richard Mudgett: Looks good to me, but someone else must approve
Jenkins2: Approved for Submit
diff --git a/res/res_format_attr_h263.c b/res/res_format_attr_h263.c
index 139fbf1..a32f40f 100644
--- a/res/res_format_attr_h263.c
+++ b/res/res_format_attr_h263.c
@@ -156,6 +156,8 @@
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 29d495b..fa33395 100644
--- a/res/res_format_attr_h264.c
+++ b/res/res_format_attr_h264.c
@@ -184,6 +184,8 @@
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);
--
To view, visit https://gerrit.asterisk.org/5691
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia44cb2e4fef5c73dc541a29da79cb0e19c22d9cc
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-commits
mailing list