Displaying 2 results from an estimated 2 matches for "buffer_wait_for_empty".
2002 Jan 18
1
ogg123 1.0rc3 thread issue
As I have mentioned here before, ogg123 from 1.0rc3 segfaults after
playing a file on FreeBSD and OpenBSD. This happens with both the
native pthread and with GNU pth. I have finally managed 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 buffe...
2002 Oct 05
2
ogg123 remote interface
...of logical bitstream loop */
-
- /* Done playing this logical bitstream. Clean up house. */
+ /* Done playing this logical bitstream. Clean up house. */
- if (audio_buffer) {
-
- if (!sig_request.exit && !sig_request.skipfile) {
- buffer_mark_eos(audio_buffer);
- buffer_wait_for_empty(audio_buffer);
+ if (audio_buffer) {
+
+ if (!sig_request.exit && !sig_request.skipfile) {
+ buffer_mark_eos(audio_buffer);
+ buffer_wait_for_empty(audio_buffer);
+ }
+
+ buffer_thread_kill(audio_buffer);
}
- buffer_thread_kill(audio_buffer);...