[Asterisk-code-review] res format attr h26x.c: Skip leading blanks in fmtp attributes (asterisk[master])
Sean Bright
asteriskteam at digium.com
Tue May 23 10:08:51 CDT 2017
Sean Bright has uploaded a new change for review. ( https://gerrit.asterisk.org/5691 )
Change subject: res_format_attr_h26x.c: Skip leading blanks in fmtp attributes
......................................................................
res_format_attr_h26x.c: Skip leading blanks in fmtp attributes
Some devices separate format attributes with a semicolon followed by a
space, so skip leading 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(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/91/5691/1
diff --git a/res/res_format_attr_h263.c b/res/res_format_attr_h263.c
index 139fbf1..f620f90 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_skip_blanks(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..fd028b9 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_skip_blanks(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: newchange
Gerrit-Change-Id: Ia44cb2e4fef5c73dc541a29da79cb0e19c22d9cc
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
More information about the asterisk-code-review
mailing list