pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/audio/sox
Module Name: pkgsrc
Committed By: nia
Date: Sun Apr 24 09:39:46 UTC 2022
Modified Files:
pkgsrc/audio/sox: Makefile distinfo
pkgsrc/audio/sox/patches: patch-src_sunaudio.c
Added Files:
pkgsrc/audio/sox/patches: patch-src_sox.c
Removed Files:
pkgsrc/audio/sox/patches: patch-aa
Log Message:
PR pkg/56800 hitting v or V during sox's play command causes a segfault
from Onno van der Linden
To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 pkgsrc/audio/sox/Makefile
cvs rdiff -u -r1.30 -r1.31 pkgsrc/audio/sox/distinfo
cvs rdiff -u -r1.13 -r0 pkgsrc/audio/sox/patches/patch-aa
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/sox/patches/patch-src_sox.c
cvs rdiff -u -r1.1 -r1.2 pkgsrc/audio/sox/patches/patch-src_sunaudio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/audio/sox/Makefile
diff -u pkgsrc/audio/sox/Makefile:1.69 pkgsrc/audio/sox/Makefile:1.70
--- pkgsrc/audio/sox/Makefile:1.69 Mon Mar 28 10:43:39 2022
+++ pkgsrc/audio/sox/Makefile Sun Apr 24 09:39:46 2022
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.69 2022/03/28 10:43:39 tnn Exp $
+# $NetBSD: Makefile,v 1.70 2022/04/24 09:39:46 nia Exp $
DISTNAME= sox-14.4.2
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=sox/}
Index: pkgsrc/audio/sox/distinfo
diff -u pkgsrc/audio/sox/distinfo:1.30 pkgsrc/audio/sox/distinfo:1.31
--- pkgsrc/audio/sox/distinfo:1.30 Tue Oct 26 09:59:30 2021
+++ pkgsrc/audio/sox/distinfo Sun Apr 24 09:39:46 2022
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.30 2021/10/26 09:59:30 nia Exp $
+$NetBSD: distinfo,v 1.31 2022/04/24 09:39:46 nia Exp $
BLAKE2s (sox-14.4.2.tar.gz) = a995d9682dad17ae557248bc008e16309537b49e3229390478e432882445b6d2
SHA512 (sox-14.4.2.tar.gz) = b5c6203f4f5577503a034fe5b3d6a033ee97fe4d171c533933e2b036118a43a14f97c9668433229708609ccf9ee16abdeca3fc7501aa0aafe06baacbba537eca
Size (sox-14.4.2.tar.gz) = 1134299 bytes
-SHA1 (patch-aa) = e6f3d06450862795648622a017b2c696328872f5
SHA1 (patch-ak) = 28675f56a0e2969d0facd98282667c53eb10c0ed
SHA1 (patch-src_coreaudio.c) = baee5596ec5efdc12f99ea9dab9e9c691a17b08d
SHA1 (patch-src_oss.c) = dca4dcf55d4bfa1da80b789cbddb48a9302e694b
-SHA1 (patch-src_sunaudio.c) = 286ad890a32d69d499f76faa255473889b091d56
+SHA1 (patch-src_sox.c) = 2ac1ec7157a1cd9581d07fea5093f49df2dd7b7f
+SHA1 (patch-src_sunaudio.c) = 9f6a67b09c46cbc8298c226d972c43e86aeaae26
Index: pkgsrc/audio/sox/patches/patch-src_sunaudio.c
diff -u pkgsrc/audio/sox/patches/patch-src_sunaudio.c:1.1 pkgsrc/audio/sox/patches/patch-src_sunaudio.c:1.2
--- pkgsrc/audio/sox/patches/patch-src_sunaudio.c:1.1 Mon May 25 19:06:24 2015
+++ pkgsrc/audio/sox/patches/patch-src_sunaudio.c Sun Apr 24 09:39:46 2022
@@ -1,9 +1,32 @@
-$NetBSD: patch-src_sunaudio.c,v 1.1 2015/05/25 19:06:24 bsiegert Exp $
+$NetBSD: patch-src_sunaudio.c,v 1.2 2022/04/24 09:39:46 nia Exp $
-Fix segfault when playing (PR pkg/49929).
---- src/sunaudio.c.orig 2015-05-25 19:00:39.000000000 +0000
+- Make the now unused (in the audio driver's case) void *fp member of the
+ sox_format_t structure a pointer to the filedescriptor of the audio
+ device in the driver and reference it in adjust_volume() with an
+ additional check for NULL. (PR pkg/56800)
+
+- Fix segfault when playing (PR pkg/49929).
+
+--- src/sunaudio.c.orig 2014-10-06 01:59:34.000000000 +0000
+++ src/sunaudio.c
-@@ -443,7 +443,7 @@ static size_t sunwrite(
+@@ -336,6 +336,8 @@ static int sunstartwrite(sox_format_t *
+ pPriv->cOutput = sox_globals.bufsiz >> pPriv->sample_shift;
+ pPriv->pOutput = lsx_malloc((size_t)pPriv->cOutput << pPriv->sample_shift);
+
++ ft->fp = &pPriv->device;
++
+ return (SOX_SUCCESS);
+ }
+
+@@ -348,6 +350,7 @@ static int sunstop(sox_format_t* ft)
+ if (pPriv->pOutput) {
+ free(pPriv->pOutput);
+ }
++ ft->fp = NULL;
+ return SOX_SUCCESS;
+ }
+
+@@ -443,7 +446,7 @@ static size_t sunwrite(
size_t cbStride;
int cbWritten;
Added files:
Index: pkgsrc/audio/sox/patches/patch-src_sox.c
diff -u /dev/null pkgsrc/audio/sox/patches/patch-src_sox.c:1.1
--- /dev/null Sun Apr 24 09:39:46 2022
+++ pkgsrc/audio/sox/patches/patch-src_sox.c Sun Apr 24 09:39:46 2022
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_sox.c,v 1.1 2022/04/24 09:39:46 nia Exp $
+
+PR pkg/56800 hitting v or V during sox's play command causes a
+segfault
+
+https://sourceforge.net/p/sox/code/ci/4b17639fb7591153dbd3e234eea21b1a2a29fcfa/
+from more than 10 years ago changed the sun audio driver for the 14.4 release
+to not use stdio (among others) while adjust_volume() in sox.c still used
+fileno under the assumption that stdio was being used in the audio driver.
+
+output_muted is not defined on NetBSD.
+
+--- src/sox.c.orig 2014-10-06 02:02:30.000000000 +0000
++++ src/sox.c
+@@ -1313,7 +1313,8 @@ static void adjust_volume(int delta)
+ #elif defined(HAVE_AUDIOIO_H)
+ static void adjust_volume(int delta)
+ {
+- int vol1 = 0, vol2 = 0, fd = fileno((FILE*)ofile->ft->fp);
++ int vol1 = 0, vol2 = 0, fd;
++ fd = ofile->ft->fp != NULL ? *((int *)ofile->ft->fp) : -1;
+ if (fd >= 0) {
+ audio_info_t audio_info;
+ if (ioctl(fd, AUDIO_GETINFO, &audio_info) >= 0) {
+@@ -1321,7 +1322,9 @@ static void adjust_volume(int delta)
+ vol2 = range_limit(vol1 + delta, 0, 100);
+ AUDIO_INITINFO(&audio_info);
+ audio_info.play.gain = (vol2 * AUDIO_MAX_GAIN + 50) / 100;
++#if defined(__sun)
+ audio_info.output_muted = 0;
++#endif
+ lsx_debug("%04x %04x", vol1, vol2);
+ if (vol1 != vol2 && ioctl(fd, AUDIO_SETINFO, &audio_info) < 0)
+ vol2 = vol1;
Home |
Main Index |
Thread Index |
Old Index