Fix two pthread programming problems; now ogg123 doesn't dump core
with native libpthread (so far). With hints and explanations from Nathan J Williams -- thanks! Bump PKGREVISION.
This commit is contained in:
parent
6c0c7208c7
commit
51b16c27be
4 changed files with 49 additions and 3 deletions
|
@ -1,8 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.21 2003/05/02 11:53:47 wiz Exp $
|
||||
# $NetBSD: Makefile,v 1.22 2003/07/12 22:35:29 wiz Exp $
|
||||
|
||||
DISTNAME= vorbis-tools-1.0
|
||||
PKGNAME= vorbis-tools-1.0.0.8
|
||||
PKGREVISION= 2
|
||||
PKGREVISION= 3
|
||||
CATEGORIES= audio
|
||||
MASTER_SITES= http://www.vorbis.com/files/1.0/unix/
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
$NetBSD: distinfo,v 1.8 2002/08/25 21:49:29 jlam Exp $
|
||||
$NetBSD: distinfo,v 1.9 2003/07/12 22:35:29 wiz Exp $
|
||||
|
||||
SHA1 (vorbis-tools-1.0.tar.gz) = 5c2508786cf6a2a270c697d3debe66ee83df376d
|
||||
Size (vorbis-tools-1.0.tar.gz) = 425404 bytes
|
||||
SHA1 (patch-aa) = b8a39b77a742cac4609fed0fd3847e34486514e0
|
||||
SHA1 (patch-ab) = 7005d73f3fffb1762fdc52177a8411a1db1b74fe
|
||||
|
|
26
audio/vorbis-tools/patches/patch-aa
Normal file
26
audio/vorbis-tools/patches/patch-aa
Normal file
|
@ -0,0 +1,26 @@
|
|||
$NetBSD: patch-aa,v 1.6 2003/07/12 22:35:30 wiz Exp $
|
||||
|
||||
--- ogg123/buffer.c.orig 2002-07-14 07:38:00.000000000 +0200
|
||||
+++ ogg123/buffer.c
|
||||
@@ -35,9 +35,10 @@
|
||||
#define MIN4(w,x,y,z) MIN( MIN(w,x), MIN(y,z) )
|
||||
|
||||
/* Special debugging code. THIS IS NOT PORTABLE! */
|
||||
+#define DEBUG_BUFFER
|
||||
#ifdef DEBUG_BUFFER
|
||||
FILE *debugfile;
|
||||
-#define DEBUG(x, y...) { fprintf (debugfile, "%d: " x "\n", getpid(), ## y); }
|
||||
+#define DEBUG(...) { fprintf (debugfile, "%d: ", getpid());fprintf(debugfile, __VA_ARGS__);fprintf(debugfile,"\n"); }
|
||||
#else
|
||||
#define DEBUG(x, y...)
|
||||
#endif
|
||||
@@ -434,7 +435,9 @@ void buffer_destroy (buf_t *buf)
|
||||
|
||||
/* Cleanup pthread variables */
|
||||
pthread_mutex_destroy(&buf->mutex);
|
||||
+ COND_SIGNAL(buf->write_cond);
|
||||
pthread_cond_destroy(&buf->write_cond);
|
||||
+ COND_SIGNAL(buf->playback_cond);
|
||||
pthread_cond_destroy(&buf->playback_cond);
|
||||
|
||||
free(buf);
|
18
audio/vorbis-tools/patches/patch-ab
Normal file
18
audio/vorbis-tools/patches/patch-ab
Normal file
|
@ -0,0 +1,18 @@
|
|||
$NetBSD: patch-ab,v 1.5 2003/07/12 22:35:30 wiz Exp $
|
||||
|
||||
--- ogg123/ogg123.c.orig 2002-07-06 21:12:18.000000000 +0200
|
||||
+++ ogg123/ogg123.c
|
||||
@@ -580,7 +580,13 @@ void play (char *source_string)
|
||||
|
||||
format->cleanup(decoder);
|
||||
transport->close(source);
|
||||
+#if 0
|
||||
+ /*
|
||||
+ * XXX: should be done properly with pthread_cleanup_push instead,
|
||||
+ * if at all.
|
||||
+ */
|
||||
status_reset_output_lock(); /* In case we were killed mid-output */
|
||||
+#endif
|
||||
|
||||
status_message(1, _("Done."));
|
||||
|
Loading…
Reference in a new issue