PR/37835 -- Copy patches from vorbis-tools that fix pthread programming problems.diff -r1.27 -r1.28 pkgsrc/audio/tremor-tools/Makefile
(shattered)
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | # $NetBSD: Makefile,v 1.27 2010/12/29 14:46:35 obache Exp $ | 1 | # $NetBSD: Makefile,v 1.28 2011/03/20 19:13:15 shattered Exp $ | |
2 | 2 | |||
3 | DISTNAME= vorbis-tools-1.0 | 3 | DISTNAME= vorbis-tools-1.0 | |
4 | PKGNAME= tremor-tools-1.0.0.8 | 4 | PKGNAME= tremor-tools-1.0.0.8 | |
5 | PKGREVISION= 11 | 5 | PKGREVISION= 12 | |
6 | CATEGORIES= audio | 6 | CATEGORIES= audio | |
7 | MASTER_SITES= http://www.vorbis.com/files/1.0/unix/ | 7 | MASTER_SITES= http://www.vorbis.com/files/1.0/unix/ | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= http://www.vorbis.com/ | 10 | HOMEPAGE= http://www.vorbis.com/ | |
11 | COMMENT= Ogg Vorbis encoder and player | 11 | COMMENT= Ogg Vorbis encoder and player | |
12 | 12 | |||
13 | PKG_DESTDIR_SUPPORT= user-destdir | 13 | PKG_DESTDIR_SUPPORT= user-destdir | |
14 | 14 | |||
15 | BUILD_DEFS+= IPV6_READY | 15 | BUILD_DEFS+= IPV6_READY | |
16 | 16 | |||
17 | CONFLICTS= vorbis-[0-9]* | 17 | CONFLICTS= vorbis-[0-9]* | |
18 | 18 |
@@ -1,14 +1,15 @@ | @@ -1,14 +1,15 @@ | |||
1 | $NetBSD: distinfo,v 1.5 2010/05/19 18:25:19 drochner Exp $ | 1 | $NetBSD: distinfo,v 1.6 2011/03/20 19:13:15 shattered Exp $ | |
2 | 2 | |||
3 | SHA1 (vorbis-tools-1.0.tar.gz) = 5c2508786cf6a2a270c697d3debe66ee83df376d | 3 | SHA1 (vorbis-tools-1.0.tar.gz) = 5c2508786cf6a2a270c697d3debe66ee83df376d | |
4 | RMD160 (vorbis-tools-1.0.tar.gz) = 2f3874699be904fdf64c6edf09e21ccb8f0eee28 | 4 | RMD160 (vorbis-tools-1.0.tar.gz) = 2f3874699be904fdf64c6edf09e21ccb8f0eee28 | |
5 | Size (vorbis-tools-1.0.tar.gz) = 425404 bytes | 5 | Size (vorbis-tools-1.0.tar.gz) = 425404 bytes | |
6 | SHA1 (patch-aa) = c2104ab110674452a440d3992158627db89b9eba | 6 | SHA1 (patch-aa) = c2104ab110674452a440d3992158627db89b9eba | |
7 | SHA1 (patch-ab) = 67987002621dd1aedddc39177d3e8267cd8aa930 | 7 | SHA1 (patch-ab) = 67987002621dd1aedddc39177d3e8267cd8aa930 | |
8 | SHA1 (patch-ac) = c38abc6647d990c89258e14a959db80cd4656db7 | 8 | SHA1 (patch-ac) = c38abc6647d990c89258e14a959db80cd4656db7 | |
9 | SHA1 (patch-ad) = 81beeaa3f8ae918fa30df26f06c92a45914ccb99 | 9 | SHA1 (patch-ad) = f4876082223020f88aec9fe2797948860076009f | |
10 | SHA1 (patch-ae) = 37b3128b58fd6dcaf303930c64ac7bf6df9fa043 | 10 | SHA1 (patch-ae) = 37b3128b58fd6dcaf303930c64ac7bf6df9fa043 | |
11 | SHA1 (patch-af) = 4bdf3edbd80ffdeacdc260fe172468ec2b0b3efb | 11 | SHA1 (patch-af) = 4bdf3edbd80ffdeacdc260fe172468ec2b0b3efb | |
12 | SHA1 (patch-ag) = 729ca84168ee781335429840ee54a2b894b82f54 | 12 | SHA1 (patch-ag) = 729ca84168ee781335429840ee54a2b894b82f54 | |
13 | SHA1 (patch-ah) = d865a74020d7c1ee6e24c6394f4a1336773fa87a | 13 | SHA1 (patch-ah) = d865a74020d7c1ee6e24c6394f4a1336773fa87a | |
14 | SHA1 (patch-ai) = c16f9f114472b1ced936d8e26161204bc25c9249 | 14 | SHA1 (patch-ai) = c16f9f114472b1ced936d8e26161204bc25c9249 | |
15 | SHA1 (patch-aj) = 3d91078799a80832ad4481610ad0836c64f3a08a |
@@ -1,21 +1,35 @@ | @@ -1,21 +1,35 @@ | |||
1 | $NetBSD: patch-ad,v 1.1.1.1 2002/09/24 09:35:17 chris Exp $ | 1 | $NetBSD: patch-ad,v 1.2 2011/03/20 19:13:16 shattered Exp $ | |
2 | 2 | |||
3 | --- ogg123/ogg123.c.orig Sat Jul 6 20:12:18 2002 | 3 | --- ogg123/ogg123.c.orig 2002-07-06 19:12:18.000000000 +0000 | |
4 | +++ ogg123/ogg123.c Sat Sep 14 19:05:37 2002 | 4 | +++ ogg123/ogg123.c | |
5 | @@ -453,6 +453,16 @@ | 5 | @@ -453,6 +453,16 @@ void play (char *source_string) | |
6 | return; | 6 | return; | |
7 | } | 7 | } | |
8 | 8 | |||
9 | + if ((new_audio_fmt.big_endian != (BYTE_ORDER == BIG_ENDIAN)) || | 9 | + if ((new_audio_fmt.big_endian != (BYTE_ORDER == BIG_ENDIAN)) || | |
10 | + new_audio_fmt.signed_sample != 1 || | 10 | + new_audio_fmt.signed_sample != 1 || | |
11 | + new_audio_fmt.word_size != 2) | 11 | + new_audio_fmt.word_size != 2) | |
12 | + { | 12 | + { | |
13 | + /* Tremor can only do big_endian, signed, 16 bit samples */ | 13 | + /* Tremor can only do big_endian, signed, 16 bit samples */ | |
14 | + status_error(_("Error, Tremor can only decode signed 16 bit PCM " | 14 | + status_error(_("Error, Tremor can only decode signed 16 bit PCM " | |
15 | + "host endian.\n")); | 15 | + "host endian.\n")); | |
16 | + return; | 16 | + return; | |
17 | + } | 17 | + } | |
18 | + | 18 | + | |
19 | /* Decide which statistics are valid */ | 19 | /* Decide which statistics are valid */ | |
20 | select_stats(stat_format, &options, source, decoder, audio_buffer); | 20 | select_stats(stat_format, &options, source, decoder, audio_buffer); | |
21 | 21 | |||
22 | @@ -580,7 +590,13 @@ void play (char *source_string) | |||
23 | ||||
24 | format->cleanup(decoder); | |||
25 | transport->close(source); | |||
26 | +#if 0 | |||
27 | + /* | |||
28 | + * XXX: should be done properly with pthread_cleanup_push instead, | |||
29 | + * if at all. | |||
30 | + */ | |||
31 | status_reset_output_lock(); /* In case we were killed mid-output */ | |||
32 | +#endif | |||
33 | ||||
34 | status_message(1, _("Done.")); | |||
35 |
$NetBSD: patch-aj,v 1.1 2011/03/20 19:13:16 shattered Exp $
--- ogg123/buffer.c.orig 2002-07-14 05:38:00.000000000 +0000
+++ ogg123/buffer.c
@@ -409,7 +409,9 @@ void buffer_reset (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);
/* Reinit pthread variables */