[asterisk-commits] file: branch file/mf-attributes r417802 - /team/file/mf-attributes/res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jul 3 06:48:37 CDT 2014
Author: file
Date: Thu Jul 3 06:48:35 2014
New Revision: 417802
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=417802
Log:
Incorporate feedback.
Modified:
team/file/mf-attributes/res/res_format_attr_celt.c
Modified: team/file/mf-attributes/res/res_format_attr_celt.c
URL: http://svnview.digium.com/svn/asterisk/team/file/mf-attributes/res/res_format_attr_celt.c?view=diff&rev=417802&r1=417801&r2=417802
==============================================================================
--- team/file/mf-attributes/res/res_format_attr_celt.c (original)
+++ team/file/mf-attributes/res/res_format_attr_celt.c Thu Jul 3 06:48:35 2014
@@ -152,29 +152,18 @@
}
attr = ast_format_get_attribute_data(cloned);
+ if (sscanf(value, "%30u", &val) != 1) {
+ ast_log(LOG_WARNING, "Unknown value '%s' for attribute type '%s'\n",
+ value, name);
+ ao2_ref(cloned, -1);
+ return NULL;
+ }
+
if (!strcasecmp(name, "sample_rate")) {
- if (sscanf(value, "%30u", &val) != 1) {
- ast_log(LOG_WARNING, "Unknown value '%s' for attribute type '%s'\n",
- value, name);
- ao2_ref(cloned, -1);
- return NULL;
- }
attr->samplerate = val;
} else if (!strcasecmp(name, "max_bitrate")) {
- if (sscanf(value, "%30u", &val) != 1) {
- ast_log(LOG_WARNING, "Unknown value '%s' for attribute type '%s'\n",
- value, name);
- ao2_ref(cloned, -1);
- return NULL;
- }
attr->maxbitrate = val;
} else if (!strcasecmp(name, "frame_size")) {
- if (sscanf(value, "%30u", &val) != 1) {
- ast_log(LOG_WARNING, "Unknown value '%s' for attribute type '%s'\n",
- value, name);
- ao2_ref(cloned, -1);
- return NULL;
- }
attr->framesize = val;
} else {
ast_log(LOG_WARNING, "Unknown attribute type '%s'\n", name);
More information about the asterisk-commits
mailing list