summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-09-03 21:17:58 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-09-03 21:17:58 +0000
commit7fc49381232177eb31aa59cc7f77104fdf77e172 (patch)
tree987e142c6f36c4ff6598637b686b8d41e372e34c /src
parent2e63499c00644768b0652b63673f66395def9868 (diff)
downloadxine-lib-7fc49381232177eb31aa59cc7f77104fdf77e172.tar.gz
xine-lib-7fc49381232177eb31aa59cc7f77104fdf77e172.tar.bz2
cool... a deadlock ;)
CVS patchset: 5337 CVS date: 2003/09/03 21:17:58
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/audio_out.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index 11f8592fc..87a26c765 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.141 2003/09/03 16:38:48 miguelfreitas Exp $
+ * $Id: audio_out.c,v 1.142 2003/09/03 21:17:58 miguelfreitas Exp $
*
* 22-8-2001 James imported some useful AC3 sections from the previous alsa driver.
* (c) 2001 Andy Lo A Foe <andy@alsaplayer.org>
@@ -1681,7 +1681,11 @@ static void ao_flush (xine_audio_port_t *this_gen) {
/* do not try this in paused mode */
while( this->flush_audio_driver ) {
+ /* release mutex to get a buffer, otherwise a deadlock may happen */
+ pthread_mutex_unlock(&this->flush_audio_driver_lock);
buf = fifo_remove (this->free_fifo);
+ pthread_mutex_lock(&this->flush_audio_driver_lock);
+
buf->num_frames = 0;
buf->stream = NULL;
fifo_append (this->out_fifo, buf);