mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
proper threads fix from Xiph CVS
This commit is contained in:
parent
e42ff35612
commit
eb7293d59e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=53342
1 changed files with 23 additions and 9 deletions
|
@ -2,16 +2,30 @@
|
|||
$FreeBSD$
|
||||
|
||||
--- ogg123/buffer.c.orig Thu Dec 20 01:24:53 2001
|
||||
+++ ogg123/buffer.c Wed Jan 16 03:26:15 2002
|
||||
@@ -88,9 +88,11 @@
|
||||
+++ ogg123/buffer.c Sat Jan 19 16:24:44 2002
|
||||
@@ -85,12 +85,6 @@
|
||||
buf_t *buf = (buf_t *)arg;
|
||||
|
||||
/* Cleanup thread data structures */
|
||||
pthread_mutex_unlock(&buf->mutex);
|
||||
+#if 0 /* KLUDGE: disabling this keeps ogg123 from crashing */
|
||||
pthread_mutex_destroy(&buf->mutex);
|
||||
pthread_cond_destroy(&buf->playback_cond);
|
||||
pthread_cond_destroy(&buf->write_cond);
|
||||
+#endif
|
||||
DEBUG("Enter buffer_thread_cleanup");
|
||||
-
|
||||
- /* Cleanup thread data structures */
|
||||
- pthread_mutex_unlock(&buf->mutex);
|
||||
- pthread_mutex_destroy(&buf->mutex);
|
||||
- pthread_cond_destroy(&buf->playback_cond);
|
||||
- pthread_cond_destroy(&buf->write_cond);
|
||||
}
|
||||
|
||||
|
||||
@@ -430,6 +424,12 @@
|
||||
void buffer_destroy (buf_t *buf)
|
||||
{
|
||||
DEBUG("buffer_destroy");
|
||||
+
|
||||
+ /* Cleanup pthread variables */
|
||||
+ pthread_mutex_destroy(&buf->mutex);
|
||||
+ pthread_cond_destroy(&buf->write_cond);
|
||||
+ pthread_cond_destroy(&buf->playback_cond);
|
||||
+
|
||||
free(buf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue