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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 24 13:03:20 CDT 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/5690 )

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
  Joshua Colp: Approved for Submit



diff --git a/res/res_format_attr_h263.c b/res/res_format_attr_h263.c
index d65a89f..42dde5a 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 ccf2176..030d0d5 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/5690
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia44cb2e4fef5c73dc541a29da79cb0e19c22d9cc
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: 14
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>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>



More information about the asterisk-commits mailing list