From fc74afb82c232221a4205579e1eddb26a91d1c26 Mon Sep 17 00:00:00 2001 From: Matthias Kretz Date: Sun, 2 Dec 2007 23:03:46 +0100 Subject: Don't signal fifo->empty right after reading the last buffer but only when a read was requested and the fifo is empty. Rationale: ao_close uses fifo_wait_empty to make sure all buffers were written to the driver before it calls close on the driver. But if empty is already signaled when ao_loop just reads the next buffer then ao_close might close the driver before ao_loop has a chance to send the buffer to the driver. --- src/xine-engine/audio_out.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 0c37b8d1f..de74ac578 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -364,7 +364,6 @@ static audio_buffer_t *fifo_remove_int (audio_fifo_t *fifo, int blocking) { fifo->last = NULL; fifo->num_buffers = 0; - pthread_cond_signal (&fifo->empty); } else fifo->num_buffers--; -- cgit v1.2.3