[Asterisk-code-review] res format attr h26x.c: Skip leading blanks in fmtp attributes (asterisk[13])
Sean Bright
asteriskteam at digium.com
Tue May 23 10:08:30 CDT 2017
Sean Bright has uploaded a new change for review. ( https://gerrit.asterisk.org/5689 )
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/89/5689/1
diff --git a/res/res_format_attr_h263.c b/res/res_format_attr_h263.c
index 22f1936..34b7909 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_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 34793ef..928e933 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_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/5689
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia44cb2e4fef5c73dc541a29da79cb0e19c22d9cc
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
More information about the asterisk-code-review
mailing list