[Git][pkg-voip-team/asterisk][master] 4 commits: Cherry-Pick app_mp3: Force output to 16 bits in mpg123
Bernhard Schmidt (@berni)
gitlab at salsa.debian.org
Mon Nov 1 21:58:02 GMT 2021
Bernhard Schmidt pushed to branch master at Debian VoIP Packaging Team / asterisk
Commits:
ec8a1b21 by Bernhard Schmidt at 2021-11-01T22:31:56+01:00
Cherry-Pick app_mp3: Force output to 16 bits in mpg123
Fix MP3 playback with mpg123 versions in Debian (which output 32 bit by default)
Closes: #996402
Thanks: Jens Bürger <jbuerger at arcor.de>
- - - - -
0938c51a by Athos Ribeiro at 2021-11-01T22:36:11+01:00
Fix missing build of the AMR codec, add autopkgtest
* Build-Depend on libvo-amrwbenc-dev for AMR codec support (LP: #1845765)
* d/t/amr: Test if AMR codec support is available
Closes: #986013
- - - - -
f696606d by Hugh McMaster at 2021-11-01T22:39:56+01:00
Fix FTBFS with GCC-11
Closes: #997136
- - - - -
5b3f72fb by Bernhard Schmidt at 2021-11-01T22:41:38+01:00
Changelog for 1:16.16.1~dfsg-3
- - - - -
7 changed files:
- debian/changelog
- debian/control
- + debian/patches/app_mp3_force_16bits.patch
- + debian/patches/configure_ac-stdc.patch
- debian/patches/series
- + debian/tests/amr
- debian/tests/control
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,19 @@
+asterisk (1:16.16.1~dfsg-3) unstable; urgency=medium
+
+ [ Bernhard Schmidt ]
+ * Cherry-Pick app_mp3: Force output to 16 bits in mpg123.
+ Thanks to Jens Bürger <jbuerger at arcor.de> (Closes: #996402)
+
+ [ Athos Ribeiro ]
+ * Fix missing build of the AMR codec, add autopkgtest (Closes: #986013)
+
+ [ Hugh McMaster ]
+ * Cherry-pick an upstream patch to remove the AC_HEADER_STDC macro from
+ configure.ac. The macro is obsolete and a no-op with autoconf 2.70
+ (Closes: #997136)
+
+ -- Bernhard Schmidt <berni at debian.org> Mon, 01 Nov 2021 22:40:39 +0100
+
asterisk (1:16.16.1~dfsg-2) unstable; urgency=high
* CVE-2021-32558 / AST-2021-008 (Closes: #991710)
=====================================
debian/control
=====================================
@@ -61,6 +61,7 @@ Build-Depends:
libtonezone-dev [linux-any],
libunbound-dev,
liburiparser-dev,
+ libvo-amrwbenc-dev,
libvorbis-dev,
libvpb-dev [linux-any],
libxml2-dev,
=====================================
debian/patches/app_mp3_force_16bits.patch
=====================================
@@ -0,0 +1,71 @@
+From 07c297d058c7a1ee5f303e5153e096b402a8d0c6 Mon Sep 17 00:00:00 2001
+From: Carlos Oliva <carlos.oliva at invoxcontact.com>
+Date: Mon, 13 Sep 2021 17:18:11 +0200
+Subject: [PATCH] app_mp3: Force output to 16 bits in mpg123
+
+In new mpg123 versions (since 1.26) the default output is 32 bits
+Asterisk expects the output in 16 bits, so we force the output to be on 16 bits.
+It will work wit new and old versions of mpg123.
+Thanks Thomas Orgis <thomas-forum at orgis.org> for giving the key!
+
+ASTERISK-29635 #close
+
+Change-Id: I88c7740118b5af4e895bd8b765b68ed5c11fc816
+---
+ apps/app_mp3.c | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/apps/app_mp3.c b/apps/app_mp3.c
+index 8d049da07dc..842224025a1 100644
+--- a/apps/app_mp3.c
++++ b/apps/app_mp3.c
+@@ -100,37 +100,37 @@ static int mp3play(const char *filename, unsigned int sampling_rate, int fd)
+ char buffer_size_str[8];
+ snprintf(buffer_size_str, 8, "%u", (int) 0.5*2*sampling_rate/1000); // 0.5 seconds for a live stream
+ /* Most commonly installed in /usr/local/bin */
+- execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, "-@", filename, (char *)NULL);
++ execl(LOCAL_MPG_123, "mpg123", "-e", "s16", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, "-@", filename, (char *)NULL);
+ /* But many places has it in /usr/bin */
+- execl(MPG_123, "mpg123", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, "-@", filename, (char *)NULL);
++ execl(MPG_123, "mpg123", "-e", "s16", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, "-@", filename, (char *)NULL);
+ /* As a last-ditch effort, try to use PATH */
+- execlp("mpg123", "mpg123", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, "-@", filename, (char *)NULL);
++ execlp("mpg123", "mpg123", "-e", "s16", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, "-@", filename, (char *)NULL);
+ }
+ else if (!strncasecmp(filename, "http://", 7)) {
+ char buffer_size_str[8];
+ snprintf(buffer_size_str, 8, "%u", 6*2*sampling_rate/1000); // 6 seconds for a remote MP3 file
+ /* Most commonly installed in /usr/local/bin */
+- execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, filename, (char *)NULL);
++ execl(LOCAL_MPG_123, "mpg123", "-e", "s16", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, filename, (char *)NULL);
+ /* But many places has it in /usr/bin */
+- execl(MPG_123, "mpg123", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, filename, (char *)NULL);
++ execl(MPG_123, "mpg123", "-e", "s16", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, filename, (char *)NULL);
+ /* As a last-ditch effort, try to use PATH */
+- execlp("mpg123", "mpg123", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, filename, (char *)NULL);
++ execlp("mpg123", "mpg123", "-e", "s16", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, filename, (char *)NULL);
+ }
+ else if (strstr(filename, ".m3u")) {
+ /* Most commonly installed in /usr/local/bin */
+- execl(LOCAL_MPG_123, "mpg123", "-q", "-z", "-s", "-f", "8192", "--mono", "-r", sampling_rate_str, "-@", filename, (char *)NULL);
++ execl(LOCAL_MPG_123, "mpg123", "-e", "s16", "-q", "-z", "-s", "-f", "8192", "--mono", "-r", sampling_rate_str, "-@", filename, (char *)NULL);
+ /* But many places has it in /usr/bin */
+- execl(MPG_123, "mpg123", "-q", "-z", "-s", "-f", "8192", "--mono", "-r", sampling_rate_str, "-@", filename, (char *)NULL);
++ execl(MPG_123, "mpg123", "-e", "s16", "-q", "-z", "-s", "-f", "8192", "--mono", "-r", sampling_rate_str, "-@", filename, (char *)NULL);
+ /* As a last-ditch effort, try to use PATH */
+- execlp("mpg123", "mpg123", "-q", "-z", "-s", "-f", "8192", "--mono", "-r", sampling_rate_str, "-@", filename, (char *)NULL);
++ execlp("mpg123", "mpg123", "-e", "s16", "-q", "-z", "-s", "-f", "8192", "--mono", "-r", sampling_rate_str, "-@", filename, (char *)NULL);
+ }
+ else {
+ /* Most commonly installed in /usr/local/bin */
+- execl(MPG_123, "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", sampling_rate_str, filename, (char *)NULL);
++ execl(MPG_123, "mpg123", "-e", "s16", "-q", "-s", "-f", "8192", "--mono", "-r", sampling_rate_str, filename, (char *)NULL);
+ /* But many places has it in /usr/bin */
+- execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", sampling_rate_str, filename, (char *)NULL);
++ execl(LOCAL_MPG_123, "mpg123", "-e", "s16", "-q", "-s", "-f", "8192", "--mono", "-r", sampling_rate_str, filename, (char *)NULL);
+ /* As a last-ditch effort, try to use PATH */
+- execlp("mpg123", "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", sampling_rate_str, filename, (char *)NULL);
++ execlp("mpg123", "mpg123", "-e", "s16", "-q", "-s", "-f", "8192", "--mono", "-r", sampling_rate_str, filename, (char *)NULL);
+ }
+ /* Can't use ast_log since FD's are closed */
+ fprintf(stderr, "Execute of mpg123 failed\n");
=====================================
debian/patches/configure_ac-stdc.patch
=====================================
@@ -0,0 +1,23 @@
+Description: Fix configure failure with autoconf 2.70
+ Cherry-pick an upstream patch from Asterisk 16.17.0-rc1 to remove the
+ AC_HEADER_STDC macro from configure.ac. The macro is obsolete and a no-op
+ in autoconf 2.70.
+Author: Jaco Kroon <jaco at uls.co.za>
+Origin: upstream, https://code.asterisk.org/code/changelog/asterisk?cs=aa03d07a085d32dbc6b482aaa5215f539f60d771
+Bug-Debian: https://bugs.debian.org/997136
+Last-Update: 2021-11-01
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -617,11 +617,6 @@
+ AC_MSG_ERROR([*** Could not find dirent header that defines 'DIR'.])
+ fi
+
+-AC_HEADER_STDC
+-if test "$ac_cv_header_stdc" != "yes"; then
+- AC_MSG_ERROR([*** ANSI C header files not found.])
+-fi
+-
+ AC_HEADER_SYS_WAIT
+ if test "$ac_cv_header_sys_wait_h" != "yes"; then
+ AC_MSG_ERROR([*** POSIX.1 compatible sys/wait.h is required.])
=====================================
debian/patches/series
=====================================
@@ -35,3 +35,6 @@ autoreconf-pjproject
AST-2021-008-16.diff
AST-2021-009-16.diff
+
+app_mp3_force_16bits.patch
+configure_ac-stdc.patch
=====================================
debian/tests/amr
=====================================
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+# Veryfy amr support is enabled as per
+# https://www.mail-archive.com/asterisk-dev@lists.digium.com/msg45213.html
+# by verifying if the amr codecs are listed and by checking if amr transcoding
+# is available
+
+asterisk -x 'core show codecs audio' | grep -E '\bamr\b'
+asterisk -x 'core show codecs audio' | grep -E '\bamrwb\b'
+
+asterisk -x 'core show translation' | grep -E '\bamr\b'
+asterisk -x 'core show translation' | grep -E '\bamrwb\b'
=====================================
debian/tests/control
=====================================
@@ -1,3 +1,7 @@
Tests: asttestmods
Restrictions: needs-root, isolation-container
Depends: asterisk, asterisk-voicemail, asterisk-tests, asterisk-core-sounds-en-gsm, libxml2-utils
+
+Tests: amr
+Restrictions: needs-root
+Depends: asterisk, asterisk-modules, grep
View it on GitLab: https://salsa.debian.org/pkg-voip-team/asterisk/-/compare/c355df4f546aa2eeb29fafcae8a262e48622ca72...5b3f72fbb089f7eb41e471fd2b9bfff6d497525c
--
View it on GitLab: https://salsa.debian.org/pkg-voip-team/asterisk/-/compare/c355df4f546aa2eeb29fafcae8a262e48622ca72...5b3f72fbb089f7eb41e471fd2b9bfff6d497525c
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-voip-maintainers/attachments/20211101/2bfe4c3e/attachment-0001.htm>
More information about the Pkg-voip-maintainers
mailing list