From 622080e96f75ce74993dfe6049724fc1792b4b7b Mon Sep 17 00:00:00 2001 From: Juergen Keil Date: Sat, 14 Dec 2002 16:17:57 +0000 Subject: ao_fill_gap() must be called with the driver_lock unlocked, because ao_fill_gap() locks the driver, too ==> deadlock CVS patchset: 3518 CVS date: 2002/12/14 16:17:57 --- src/xine-engine/audio_out.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 8cff4527f..370fa3012 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -17,7 +17,7 @@ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.c,v 1.87 2002/12/06 01:13:17 miguelfreitas Exp $ + * $Id: audio_out.c,v 1.88 2002/12/14 16:17:57 jkeil Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe @@ -207,7 +207,7 @@ static audio_buffer_t *fifo_remove (audio_fifo_t *fifo) { } -void write_pause_burst(xine_audio_port_t *this, uint32_t num_frames) { +static void write_pause_burst(xine_audio_port_t *this, uint32_t num_frames) { int error = 0; unsigned char buf[8192]; @@ -567,7 +567,9 @@ static void *ao_loop (void *this_gen) { delay = this->driver->delay(this->driver); while (delay < 0 && this->audio_loop_running) { /* Get the audio card into RUNNING state. */ + pthread_mutex_unlock( &this->driver_lock ); ao_fill_gap (this, 10000); /* FIXME, this PTS of 1000 should == period size */ + pthread_mutex_lock( &this->driver_lock ); delay = this->driver->delay(this->driver); } pthread_mutex_unlock( &this->driver_lock ); -- cgit v1.2.3