diff -Nru asterisk-13.1.0~dfsg/debian/changelog asterisk-13.1.0~dfsg/debian/changelog --- asterisk-13.1.0~dfsg/debian/changelog 2016-04-05 05:13:44.000000000 -0700 +++ asterisk-13.1.0~dfsg/debian/changelog 2017-03-30 16:43:30.000000000 -0700 @@ -1,3 +1,11 @@ +asterisk (1:13.1.0~dfsg-1.1ubuntu4.1) xenial; urgency=medium + + * debian/patches/fix_h264.patch: Backport fixes for H.264 support. + Thanks to Joshua Colp , Alexander Traud + , and Jörg Hänsel. Closes LP: #1671767. + + -- Nishanth Aravamudan Thu, 30 Mar 2017 16:43:30 -0700 + asterisk (1:13.1.0~dfsg-1.1ubuntu4) xenial; urgency=medium * Rebuild against libmysqlclient20. diff -Nru asterisk-13.1.0~dfsg/debian/patches/fix_h264.patch asterisk-13.1.0~dfsg/debian/patches/fix_h264.patch --- asterisk-13.1.0~dfsg/debian/patches/fix_h264.patch 1969-12-31 16:00:00.000000000 -0800 +++ asterisk-13.1.0~dfsg/debian/patches/fix_h264.patch 2017-03-30 16:42:53.000000000 -0700 @@ -0,0 +1,84 @@ +Description: Backport fixes for H.264 support +Author: Joshua Colp +Author: Alexander Traud +Source: upstream, https://github.com/asterisk/asterisk/commit/14a57782a6685a4fb432e18527974188b3f76ecf +Source: upstream, https://github.com/asterisk/asterisk/commit/92ea46ba94028c7082a0e1ae8fb22d9a327c90fa +Bug: https://issues.asterisk.org/jira/browse/ASTERISK-24616 +Bug: https://issues.asterisk.org/jira/browse/ASTERISK-25573 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/asterisk/+bug/1671767 +Reviewed-by: Nishanth Aravamudan +Last-Update: 2017-03-30 + +--- asterisk-13.1.0~dfsg.orig/res/res_format_attr_h264.c ++++ asterisk-13.1.0~dfsg/res/res_format_attr_h264.c +@@ -153,13 +153,13 @@ static struct ast_format *h264_getjoint( + if (attr1 && !ast_strlen_zero(attr1->SPS)) { + ast_copy_string(attr->SPS, attr1->SPS, sizeof(attr->SPS)); + } else if (attr2 && !ast_strlen_zero(attr2->SPS)) { +- ast_copy_string(attr->SPS, attr1->SPS, sizeof(attr->SPS)); ++ ast_copy_string(attr->SPS, attr2->SPS, sizeof(attr->SPS)); + } + + if (attr1 && !ast_strlen_zero(attr1->PPS)) { + ast_copy_string(attr->PPS, attr1->PPS, sizeof(attr->PPS)); + } else if (attr2 && !ast_strlen_zero(attr2->PPS)) { +- ast_copy_string(attr->PPS, attr1->PPS, sizeof(attr->PPS)); ++ ast_copy_string(attr->PPS, attr2->PPS, sizeof(attr->PPS)); + } + + return cloned; +@@ -236,7 +236,7 @@ static struct ast_format *h264_parse_sdp + if (field != H264_ATTR_KEY_UNSET) { \ + if (added) { \ + ast_str_append(str, 0, ";"); \ +- } else { \ ++ } else if (0 < ast_str_append(str, 0, "a=fmtp:%u ", payload)) { \ + added = 1; \ + } \ + ast_str_append(str, 0, "%s=%u", name, field); \ +@@ -247,7 +247,7 @@ static struct ast_format *h264_parse_sdp + if (field) { \ + if (added) { \ + ast_str_append(str, 0, ";"); \ +- } else { \ ++ } else if (0 < ast_str_append(str, 0, "a=fmtp:%u ", payload)) { \ + added = 1; \ + } \ + ast_str_append(str, 0, "%s=%u", name, field); \ +@@ -263,8 +263,6 @@ static void h264_generate_sdp_fmtp(const + return; + } + +- ast_str_append(str, 0, "a=fmtp:%u ", payload); +- + APPEND_IF_NONZERO(attr->MAX_MBPS, str, "max-mbps"); + APPEND_IF_NONZERO(attr->MAX_FS, str, "max-fs"); + APPEND_IF_NONZERO(attr->MAX_CPB, str, "max-cpb"); +@@ -287,7 +285,7 @@ static void h264_generate_sdp_fmtp(const + if (attr->PROFILE_IDC && attr->PROFILE_IOP && attr->LEVEL) { + if (added) { + ast_str_append(str, 0, ";"); +- } else { ++ } else if (0 < ast_str_append(str, 0, "a=fmtp:%u ", payload)) { + added = 1; + } + ast_str_append(str, 0, "profile-level-id=%02X%02X%02X", attr->PROFILE_IDC, attr->PROFILE_IOP, attr->LEVEL); +@@ -296,15 +294,13 @@ static void h264_generate_sdp_fmtp(const + if (!ast_strlen_zero(attr->SPS) && !ast_strlen_zero(attr->PPS)) { + if (added) { + ast_str_append(str, 0, ";"); +- } else { ++ } else if (0 < ast_str_append(str, 0, "a=fmtp:%u ", payload)) { + added = 1; + } +- ast_str_append(str, 0, ";sprop-parameter-sets=%s,%s", attr->SPS, attr->PPS); ++ ast_str_append(str, 0, "sprop-parameter-sets=%s,%s", attr->SPS, attr->PPS); + } + +- if (!added) { +- ast_str_reset(*str); +- } else { ++ if (added) { + ast_str_append(str, 0, "\r\n"); + } + diff -Nru asterisk-13.1.0~dfsg/debian/patches/series asterisk-13.1.0~dfsg/debian/patches/series --- asterisk-13.1.0~dfsg/debian/patches/series 2015-08-12 22:36:15.000000000 -0700 +++ asterisk-13.1.0~dfsg/debian/patches/series 2017-03-30 14:27:10.000000000 -0700 @@ -26,3 +26,4 @@ configure-osarch AST-2015-001-13.diff +fix_h264.patch