[Pkg-voip-commits] [asterisk] 03/05: Update amr.patch. Unfuzz patches.
Jonas Smedegaard
dr at jones.dk
Mon Aug 29 15:56:39 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository asterisk.
commit 19c1fc52df5bc90e04f17298eaa4a87b1ef6eecc
Author: Jonas Smedegaard <dr at jones.dk>
Date: Mon Aug 29 16:47:13 2016 +0200
Update amr.patch. Unfuzz patches.
---
debian/patches/amr.patch | 124 +++++++++++-----------------------
debian/patches/ffmpeg-detection.patch | 2 +-
debian/patches/hurd_osarch.patch | 11 ---
debian/patches/opus.patch | 10 +--
debian/patches/radcli-detection.patch | 2 +-
debian/patches/systemd.patch | 14 ++--
6 files changed, 52 insertions(+), 111 deletions(-)
diff --git a/debian/patches/amr.patch b/debian/patches/amr.patch
index 3e304ae..bfb9b10 100644
--- a/debian/patches/amr.patch
+++ b/debian/patches/amr.patch
@@ -49,7 +49,7 @@ License: Unlicense
OTHER DEALINGS IN THE SOFTWARE.
.
For more information, please refer to <http://unlicense.org/>
-Last-Update: 2016-04-02
+Last-Update: 2016-08-29
--- a/build_tools/menuselect-deps.in
+++ b/build_tools/menuselect-deps.in
@@ -568,40 +568,27 @@ Last-Update: 2016-04-02
+#endif /* _AST_FORMAT_AMR_H */
--- a/include/asterisk/format_cache.h
+++ b/include/asterisk/format_cache.h
-@@ -209,6 +209,16 @@
- extern struct ast_format *ast_format_opus;
+@@ -224,6 +224,16 @@
+ extern struct ast_format *ast_format_none;
/*!
-+ * \brief Built-in cached amr format.
++ * \brief Built-in cached AMR format.
+ */
+extern struct ast_format *ast_format_amr;
+
+/*!
-+ * \brief Built-in cached amrwb format.
++ * \brief Built-in cached AMR-WB format.
+ */
+extern struct ast_format *ast_format_amrwb;
+
+/*!
- * \brief Built-in cached t140 format.
- */
- extern struct ast_format *ast_format_t140;
---- a/include/asterisk/format_compatibility.h
-+++ b/include/asterisk/format_compatibility.h
-@@ -71,6 +71,10 @@
- #define AST_FORMAT_SPEEX16 (1ULL << 33)
- /*! Opus audio (8kHz, 16kHz, 24kHz, 48Khz) */
- #define AST_FORMAT_OPUS (1ULL << 34)
-+/*! AMR audio (8kHz) */
-+#define AST_FORMAT_AMR (1ULL << 35)
-+/*! AMR-WB audio (16kHz) */
-+#define AST_FORMAT_AMR_WB (1ULL << 36)
- /*! Raw testing-law data (G.711) */
- #define AST_FORMAT_TESTLAW (1ULL << 47)
- /*! H.261 Video */
+ * \brief Initialize format cache support within the core.
+ *
+ * \retval 0 success
--- a/main/codec_builtin.c
+++ b/main/codec_builtin.c
-@@ -717,6 +717,54 @@
- .samples_count = opus_samples,
+@@ -780,6 +780,54 @@
+ .type = AST_MEDIA_TYPE_TEXT,
};
+static int amr_samples(struct ast_frame *frame)
@@ -652,30 +639,30 @@ Last-Update: 2016-04-02
+ .smooth = 0,
+};
+
- static struct ast_codec jpeg = {
- .name = "jpeg",
- .description = "JPEG image",
-@@ -837,6 +885,8 @@
- res |= CODEC_REGISTER_AND_CACHE(testlaw);
- res |= CODEC_REGISTER_AND_CACHE(g719);
- res |= CODEC_REGISTER_AND_CACHE(opus);
+ #define CODEC_REGISTER_AND_CACHE(codec) \
+ ({ \
+ int __res_ ## __LINE__ = 0; \
+@@ -812,6 +860,8 @@
+ {
+ int res = 0;
+
+ res |= CODEC_REGISTER_AND_CACHE(amr);
-+ res |= CODEC_REGISTER_AND_CACHE_NAMED("amrwb", amrwb);
- res |= CODEC_REGISTER_AND_CACHE(jpeg);
- res |= CODEC_REGISTER_AND_CACHE(png);
- res |= CODEC_REGISTER_AND_CACHE(h261);
++ res |= CODEC_REGISTER_AND_CACHE(amrwb);
+ res |= CODEC_REGISTER_AND_CACHE(g723);
+ res |= CODEC_REGISTER_AND_CACHE(ulaw);
+ res |= CODEC_REGISTER_AND_CACHE(alaw);
--- a/main/format_cache.c
+++ b/main/format_cache.c
@@ -218,6 +218,16 @@
struct ast_format *ast_format_opus;
/*!
-+ * \brief Built-in cached amr format.
++ * \brief Built-in cached AMR format.
+ */
+struct ast_format *ast_format_amr;
+
+/*!
-+ * \brief Built-in cached amrwb format.
++ * \brief Built-in cached AMR-WB format.
+ */
+struct ast_format *ast_format_amrwb;
+
@@ -683,15 +670,15 @@ Last-Update: 2016-04-02
* \brief Built-in cached t140 format.
*/
struct ast_format *ast_format_t140;
-@@ -320,6 +330,8 @@
- ao2_replace(ast_format_testlaw, NULL);
- ao2_replace(ast_format_g719, NULL);
- ao2_replace(ast_format_opus, NULL);
+@@ -292,6 +302,8 @@
+ ao2_cleanup(formats);
+ formats = NULL;
+
+ ao2_replace(ast_format_amr, NULL);
+ ao2_replace(ast_format_amrwb, NULL);
- ao2_replace(ast_format_jpeg, NULL);
- ao2_replace(ast_format_png, NULL);
- ao2_replace(ast_format_h261, NULL);
+ ao2_replace(ast_format_g723, NULL);
+ ao2_replace(ast_format_ulaw, NULL);
+ ao2_replace(ast_format_alaw, NULL);
@@ -404,6 +416,10 @@
ao2_replace(ast_format_g719, format);
} else if (!strcmp(name, "opus")) {
@@ -703,63 +690,28 @@ Last-Update: 2016-04-02
} else if (!strcmp(name, "jpeg")) {
ao2_replace(ast_format_jpeg, format);
} else if (!strcmp(name, "png")) {
---- a/main/format_compatibility.c
-+++ b/main/format_compatibility.c
-@@ -78,6 +78,10 @@
- return AST_FORMAT_SPEEX16;
- } else if (ast_format_cmp(format, ast_format_opus) == AST_FORMAT_CMP_EQUAL) {
- return AST_FORMAT_OPUS;
-+ } else if (ast_format_cmp(format, ast_format_amr) == AST_FORMAT_CMP_EQUAL) {
-+ return AST_FORMAT_AMR;
-+ } else if (ast_format_cmp(format, ast_format_amrwb) == AST_FORMAT_CMP_EQUAL) {
-+ return AST_FORMAT_AMR_WB;
- } else if (ast_format_cmp(format, ast_format_testlaw) == AST_FORMAT_CMP_EQUAL) {
- return AST_FORMAT_TESTLAW;
- } else if (ast_format_cmp(format, ast_format_h261) == AST_FORMAT_CMP_EQUAL) {
-@@ -145,6 +149,10 @@
- return AST_FORMAT_SPEEX16;
- } else if (codec->id == ast_format_get_codec_id(ast_format_opus)) {
- return AST_FORMAT_OPUS;
-+ } else if (codec->id == ast_format_get_codec_id(ast_format_amr)) {
-+ return AST_FORMAT_AMR;
-+ } else if (codec->id == ast_format_get_codec_id(ast_format_amrwb)) {
-+ return AST_FORMAT_AMR_WB;
- } else if (codec->id == ast_format_get_codec_id(ast_format_testlaw)) {
- return AST_FORMAT_TESTLAW;
- } else if (codec->id == ast_format_get_codec_id(ast_format_h261)) {
-@@ -232,6 +240,12 @@
- /*! Opus audio (8kHz, 16kHz, 24kHz, 48Khz) */
- case AST_FORMAT_OPUS:
- return ast_format_opus;
-+ /*! AMR audio (8kHz) */
-+ case AST_FORMAT_AMR:
-+ return ast_format_amr;
-+ /*! AMR-WB audio (16kHz) */
-+ case AST_FORMAT_AMR_WB:
-+ return ast_format_amrwb;
- /*! Raw mu-law data (G.711) */
- case AST_FORMAT_TESTLAW:
- return ast_format_testlaw;
--- a/main/rtp_engine.c
+++ b/main/rtp_engine.c
-@@ -2183,6 +2183,8 @@
- /* Opus and VP8 */
+@@ -2199,6 +2199,9 @@
set_next_mime_type(ast_format_opus, 0, "audio", "opus", 48000);
set_next_mime_type(ast_format_vp8, 0, "video", "VP8", 90000);
+
+ set_next_mime_type(ast_format_amr, 0, "audio", "AMR", 8000);
+ set_next_mime_type(ast_format_amrwb, 0, "audio", "AMR-WB", 16000);
-
++
/* Define the static rtp payload mappings */
add_static_payload(0, ast_format_ulaw, 0);
-@@ -2227,6 +2229,8 @@
- /* Opus and VP8 */
+ #ifdef USE_DEPRECATED_G726
+@@ -2243,6 +2246,9 @@
add_static_payload(100, ast_format_vp8, 0);
add_static_payload(107, ast_format_opus, 0);
+
+ add_static_payload(108, ast_format_amr, 0);
+ add_static_payload(109, ast_format_amrwb, 0);
-
++
return 0;
}
+
--- a/makeopts.in
+++ b/makeopts.in
@@ -120,6 +120,13 @@
diff --git a/debian/patches/ffmpeg-detection.patch b/debian/patches/ffmpeg-detection.patch
index 2837f1d..cfd0455 100644
--- a/debian/patches/ffmpeg-detection.patch
+++ b/debian/patches/ffmpeg-detection.patch
@@ -20,7 +20,7 @@ Last-Update: 2016-04-02
AST_EXT_LIB_SETUP([GSM], [External GSM], [gsm], [, use 'internal' GSM otherwise])
AST_EXT_LIB_SETUP([ILBC], [System iLBC], [ilbc], [, use 'internal' iLBC otherwise])
AST_EXT_LIB_SETUP([GTK2], [gtk2], [gtk2])
-@@ -2556,7 +2556,18 @@
+@@ -2561,7 +2561,18 @@
AST_EXT_TOOL_CHECK([SDL], [sdl-config])
AST_EXT_LIB_CHECK([SDL_IMAGE], [SDL_image], [IMG_Load], [SDL_image.h], [${SDL_LIB}], [${SDL_INCLUDE}])
diff --git a/debian/patches/hurd_osarch.patch b/debian/patches/hurd_osarch.patch
index 033136d..19581e8 100644
--- a/debian/patches/hurd_osarch.patch
+++ b/debian/patches/hurd_osarch.patch
@@ -15,14 +15,3 @@ Last-Update: 2016-04-02
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__Darwin__) || defined(__GLIBC__)
#include <net/if_dl.h>
#endif
---- a/Makefile
-+++ b/Makefile
-@@ -825,7 +825,7 @@
- rm -f contrib/scripts/asterisk.logrotate.tmp
-
- config:
-- @if [ "${OSARCH}" = "linux-gnu" -o "${OSARCH}" = "kfreebsd-gnu" ]; then \
-+ @if [ "${OSARCH}" = "linux-gnu" -o "${OSARCH}" = "kfreebsd-gnu" -o "${OSARCH}" = "gnu" ]; then \
- $(INSTALL) -d $(DESTDIR)/lib/systemd/system; \
- ./build_tools/install_subst -d contrib/asterisk.service $(DESTDIR)/lib/systemd/system/asterisk.service; \
- if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
diff --git a/debian/patches/opus.patch b/debian/patches/opus.patch
index fbfdd8e..aaafcf7 100644
--- a/debian/patches/opus.patch
+++ b/debian/patches/opus.patch
@@ -25,16 +25,16 @@ Last-Update: 2016-04-02
http.o: _ASTCFLAGS+=$(GMIME_INCLUDE)
--- a/main/codec_builtin.c
+++ b/main/codec_builtin.c
-@@ -38,6 +38,8 @@
- #include "asterisk/format_cache.h"
- #include "asterisk/frame.h"
+@@ -41,6 +41,8 @@
+ int __ast_codec_register_with_format(struct ast_codec *codec, const char *format_name,
+ struct ast_module *mod);
+#include <opus/opus.h>
+
enum frame_type {
TYPE_HIGH, /* 0x0 */
TYPE_LOW, /* 0x1 */
-@@ -698,6 +700,11 @@
+@@ -701,6 +703,11 @@
.get_length = g719_length,
};
@@ -46,7 +46,7 @@ Last-Update: 2016-04-02
static struct ast_codec opus = {
.name = "opus",
.description = "Opus Codec",
-@@ -707,6 +714,7 @@
+@@ -710,6 +717,7 @@
.maximum_ms = 60,
.default_ms = 20,
.minimum_bytes = 10,
diff --git a/debian/patches/radcli-detection.patch b/debian/patches/radcli-detection.patch
index a856b1d..38b7434 100644
--- a/debian/patches/radcli-detection.patch
+++ b/debian/patches/radcli-detection.patch
@@ -4,7 +4,7 @@ Last-Update: 2016-05-18
--- a/configure.ac
+++ b/configure.ac
-@@ -2323,11 +2323,16 @@
+@@ -2328,11 +2328,16 @@
# Accept either RADIUS client library, their APIs are fully compatible,
# just different header filenames and different SONAMEs
diff --git a/debian/patches/systemd.patch b/debian/patches/systemd.patch
index f6e03c5..4383ba2 100644
--- a/debian/patches/systemd.patch
+++ b/debian/patches/systemd.patch
@@ -133,12 +133,12 @@ Last-Update: 2016-04-02
+WantedBy=multi-user.target
--- a/Makefile
+++ b/Makefile
-@@ -826,6 +826,8 @@
+@@ -825,6 +825,8 @@
+ rm -f contrib/scripts/asterisk.logrotate.tmp
config:
- @if [ "${OSARCH}" = "linux-gnu" -o "${OSARCH}" = "kfreebsd-gnu" ]; then \
-+ $(INSTALL) -d $(DESTDIR)/lib/systemd/system; \
-+ ./build_tools/install_subst -d contrib/asterisk.service $(DESTDIR)/lib/systemd/system/asterisk.service; \
- if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
- ./build_tools/install_subst contrib/init.d/rc.redhat.asterisk "$(DESTDIR)/etc/rc.d/init.d/asterisk"; \
- if [ ! -f "$(DESTDIR)/etc/sysconfig/asterisk" ] ; then \
++ $(INSTALL) -d $(DESTDIR)/lib/systemd/system
++ ./build_tools/install_subst -d contrib/asterisk.service $(DESTDIR)/lib/systemd/system/asterisk.service
+ if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
+ ./build_tools/install_subst contrib/init.d/rc.redhat.asterisk "$(DESTDIR)/etc/rc.d/init.d/asterisk"; \
+ if [ ! -f "$(DESTDIR)/etc/sysconfig/asterisk" ] ; then \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/asterisk.git
More information about the Pkg-voip-commits
mailing list