[asterisk-commits] file: branch file/media-attrib-sdp r369368 - /team/file/media-attrib-sdp/res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jun 25 14:27:13 CDT 2012
Author: file
Date: Mon Jun 25 14:27:10 2012
New Revision: 369368
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=369368
Log:
Use a base level profile when doing the comparison if no details are available.
Modified:
team/file/media-attrib-sdp/res/res_format_attr_h264.c
Modified: team/file/media-attrib-sdp/res/res_format_attr_h264.c
URL: http://svnview.digium.com/svn/asterisk/team/file/media-attrib-sdp/res/res_format_attr_h264.c?view=diff&rev=369368&r1=369367&r2=369368
==============================================================================
--- team/file/media-attrib-sdp/res/res_format_attr_h264.c (original)
+++ team/file/media-attrib-sdp/res/res_format_attr_h264.c Mon Jun 25 14:27:10 2012
@@ -72,12 +72,11 @@
static enum ast_format_cmp_res h264_format_attr_cmp(const struct ast_format_attr *fattr1, const struct ast_format_attr *fattr2)
{
+ unsigned int idc1 = fattr1->format_attr[H264_ATTR_KEY_PROFILE_IDC] ? fattr1->format_attr[H264_ATTR_KEY_PROFILE_IDC] : 0x42;
+ unsigned int idc2 = fattr2->format_attr[H264_ATTR_KEY_PROFILE_IDC] ? fattr2->format_attr[H264_ATTR_KEY_PROFILE_IDC] : 0x42;
+
/* We are as permissive as possible to ensure the maximum number of calls succeed */
- if (fattr1->format_attr[H264_ATTR_KEY_PROFILE_IDC] == fattr2->format_attr[H264_ATTR_KEY_PROFILE_IDC]) {
- return AST_FORMAT_CMP_EQUAL;
- }
-
- return AST_FORMAT_CMP_NOT_EQUAL;
+ return (idc1 == idc2) ? AST_FORMAT_CMP_EQUAL : AST_FORMAT_CMP_NOT_EQUAL;
}
static int h264_format_attr_get_joint(const struct ast_format_attr *fattr1, const struct ast_format_attr *fattr2, struct ast_format_attr *result)
@@ -88,7 +87,7 @@
result->format_attr[i] = fattr1->format_attr[i] ? fattr1->format_attr[i] : fattr2->format_attr[i];
}
- return 0;
+ return 0;
}
static int h264_format_attr_sdp_parse(struct ast_format_attr *format_attr, const char *attributes)
More information about the asterisk-commits
mailing list