<div dir="ltr"><div><div><div><div>Hello everyone.<br><br></div>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.<br></div>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.<br>
<br></div>The patch that follows is basically a <br>sed -i'' '/profile-level-id/ s#%X%X%X#%02X%02X%02X#' <br></div>to ensure that the profile-level-id is always six-hex-digits long.<br><div><div><div><div>
<div><br></div><div>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.<br><br></div><div>Kind Regards,<br></div><div>Guillaume.<br></div><div>
<br>---------------------------------------------------------------------------------------------------------------<br><div class="gmail_quote"><br><div dir="ltr"><div>--- res_format_attr_h264.c (revision 13930)</div>
<div>+++ res_format_attr_h264.c (working copy)</div><div><div>@@ -268,11 +272,11 @@</div><div> } else if (i == H264_ATTR_KEY_PROFILE_IDC && format_attr->format_attr[H264_ATTR_KEY_PROFILE_IDC] &&</div>
<div> format_attr->format_attr[H264_ATTR_KEY_PROFILE_IOP] && format_attr->format_attr[H264_ATTR_KEY_LEVEL]) {</div><div> if (!added) {</div><div>- ast_str_append(str, 0, "a=fmtp:%d profile-level-id=%X%X%X", payload, format_attr->format_attr[H264_ATTR_KEY_PROFILE_IDC],</div>
<div>+ ast_str_append(str, 0, "a=fmtp:%d profile-level-id=%02X%02X%02X", payload, format_attr->format_attr[H264_ATTR_KEY_PROFILE_IDC],</div><div> format_attr->format_attr[H264_ATTR_KEY_PROFILE_IOP], format_attr->format_attr[H264_ATTR_KEY_LEVEL]);</div>
<div> added = 1;</div><div> } else {</div><div>- ast_str_append(str, 0, ";profile-level-id=%X%X%X", format_attr->format_attr[H264_ATTR_KEY_PROFILE_IDC],</div>
<div>+ ast_str_append(str, 0, ";profile-level-id=%02X%02X%02X", format_attr->format_attr[H264_ATTR_KEY_PROFILE_IDC],</div><div> format_attr->format_attr[H264_ATTR_KEY_PROFILE_IOP], format_attr->format_attr[H264_ATTR_KEY_LEVEL]);</div>
<div> }</div><div> } else if ((name = h264_attr_key_to_str(i)) && h264_attr_key_addable(format_attr, i)) {</div></div><div><br></div></div></div><br>-- <br>Guillaume Maudoux<br>
Product Development Engineer<br> ESCAUX<br> <br> <span style="color:rgb(112,48,160);font-weight:bold">ESCAUX, the nr 1 alternative in Unified Communication</span><br> Chaussée de Bruxelles 408, 1300 Wavre, Belgium<br> Direct: +3227887560<br>
Main: +3226860900<br> <a href="http://www.escaux.com" target="_blank">www.escaux.com</a><br>
</div></div></div></div></div></div>