[asterisk-commits] res format attr h26x: Trim blanks in fmtp attributes (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 24 09:39:40 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5689 )

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 22f1936..f5eef93 100644
--- a/res/res_format_attr_h263.c
+++ b/res/res_format_attr_h263.c
@@ -158,6 +158,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 34793ef..4a39fcc 100644
--- a/res/res_format_attr_h264.c
+++ b/res/res_format_attr_h264.c
@@ -186,6 +186,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/5689
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia44cb2e4fef5c73dc541a29da79cb0e19c22d9cc
Gerrit-PatchSet: 4
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-commits mailing list