summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Keil <jkeil@users.sourceforge.net>2002-12-14 16:17:57 +0000
committerJuergen Keil <jkeil@users.sourceforge.net>2002-12-14 16:17:57 +0000
commit622080e96f75ce74993dfe6049724fc1792b4b7b (patch)
tree23bdcbeb7bf243b6820c193229ba15889e034f22
parentfc4f4822ad38a6fd9432c7c1e4b606b4114a75f9 (diff)
downloadxine-lib-622080e96f75ce74993dfe6049724fc1792b4b7b.tar.gz
xine-lib-622080e96f75ce74993dfe6049724fc1792b4b7b.tar.bz2
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
-rw-r--r--src/xine-engine/audio_out.c6
1 files changed, 4 insertions, 2 deletions
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 <andy@alsaplayer.org>
@@ -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 );