Displaying 2 results from an estimated 2 matches for "buffer_thread_cleanup".
2002 Jan 18
1
ogg123 1.0rc3 thread issue
...to isolate
the problem.
ogg123 crashes inside pthread_cond_wait(), specifically in the
COND_WAIT() call in buffer_wait_for_empty().
*If* I understand the control flow correctly, the decoder thread
waits on a condition variable here that has already been removed
by the other thread winding down in buffer_thread_cleanup(). This
would result in "undefined behavior".
Removing the pthread_*_destroy() calls from buffer_thread_cleanup()
eliminates the crash.
--- 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 @@
/* Cleanup thread data structur...
2002 Oct 05
2
ogg123 remote interface
...int (* peek) (data_source_t *source, void *ptr, size_t size, size_t nmemb);
-------------- next part --------------
diff -urN -X diff.ignore ogg123.orig/buffer.c ogg123/buffer.c
--- ogg123.orig/buffer.c Sun Jul 14 07:38:00 2002
+++ ogg123/buffer.c Sat Oct 5 14:34:32 2002
@@ -87,7 +87,7 @@
void buffer_thread_cleanup (void *arg)
{
- buf_t *buf = (buf_t *)arg;
+ //buf_t *buf = (buf_t *)arg;
DEBUG("Enter buffer_thread_cleanup");
}
diff -urN -X diff.ignore ogg123.orig/cfgfile_options.c ogg123/cfgfile_options.c
--- ogg123.orig/cfgfile_options.c Sat Jan 26 12:06:37 2002
+++ ogg123/cfgfile_options....