[asterisk-dev] Fwd: patch
Guillaume Maudoux
guillaume.maudoux at escaux.com
Thu Feb 13 07:55:33 CST 2014
Hello everyone.
We have been struggling for one week on a bug with H264 video in
asterisk11. I do not know if it also applies to Asterisk 12.
Apparently res_format_attr_h264.c does not write properly the codec
attributes in the SDP, causing a codec mismatch when sending the video
frames.
The patch that follows is basically a
sed -i'' '/profile-level-id/ s#%X%X%X#%02X%02X%02X#'
to ensure that the profile-level-id is always six-hex-digits long.
I am not too sure about how to integrate the patch or submit a merge
request, and really lack the time now to investigate further.
Kind Regards,
Guillaume.
---------------------------------------------------------------------------------------------------------------
--- res_format_attr_h264.c (revision 13930)
+++ res_format_attr_h264.c (working copy)
@@ -268,11 +272,11 @@
} else if (i == H264_ATTR_KEY_PROFILE_IDC &&
format_attr->format_attr[H264_ATTR_KEY_PROFILE_IDC] &&
format_attr->format_attr[H264_ATTR_KEY_PROFILE_IOP] &&
format_attr->format_attr[H264_ATTR_KEY_LEVEL]) {
if (!added) {
- ast_str_append(str, 0, "a=fmtp:%d
profile-level-id=%X%X%X", payload,
format_attr->format_attr[H264_ATTR_KEY_PROFILE_IDC],
+ ast_str_append(str, 0, "a=fmtp:%d
profile-level-id=%02X%02X%02X", payload,
format_attr->format_attr[H264_ATTR_KEY_PROFILE_IDC],
format_attr->format_attr[H264_ATTR_KEY_PROFILE_IOP],
format_attr->format_attr[H264_ATTR_KEY_LEVEL]);
added = 1;
} else {
- ast_str_append(str, 0,
";profile-level-id=%X%X%X",
format_attr->format_attr[H264_ATTR_KEY_PROFILE_IDC],
+ ast_str_append(str, 0,
";profile-level-id=%02X%02X%02X",
format_attr->format_attr[H264_ATTR_KEY_PROFILE_IDC],
format_attr->format_attr[H264_ATTR_KEY_PROFILE_IOP],
format_attr->format_attr[H264_ATTR_KEY_LEVEL]);
}
} else if ((name = h264_attr_key_to_str(i)) &&
h264_attr_key_addable(format_attr, i)) {
--
Guillaume Maudoux
Product Development Engineer
ESCAUX
ESCAUX, the nr 1 alternative in Unified Communication
Chaussée de Bruxelles 408, 1300 Wavre, Belgium
Direct: +3227887560
Main: +3226860900
www.escaux.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140213/459415bc/attachment.html>
More information about the asterisk-dev
mailing list