Commit feb33ac8 authored by Gildas Bazin's avatar Gildas Bazin

* fixed deadlock in NextFrame() in aout_pcm.c
parent 885583cc
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aout_ext-dec.c : exported fifo management functions * aout_ext-dec.c : exported fifo management functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: aout_ext-dec.c,v 1.14 2002/03/26 23:08:40 gbazin Exp $ * $Id: aout_ext-dec.c,v 1.15 2002/05/18 15:51:37 gbazin Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr> * Cyril Deguet <asmax@via.ecp.fr>
...@@ -184,7 +184,9 @@ void aout_DestroyFifo( aout_fifo_t * p_fifo ) ...@@ -184,7 +184,9 @@ void aout_DestroyFifo( aout_fifo_t * p_fifo )
{ {
intf_WarnMsg( 2, "aout info: fifo #%i destroyed", p_fifo->i_fifo ); intf_WarnMsg( 2, "aout info: fifo #%i destroyed", p_fifo->i_fifo );
vlc_mutex_lock( &p_fifo->data_lock );
p_fifo->b_die = 1; p_fifo->b_die = 1;
vlc_mutex_unlock( &p_fifo->data_lock );
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aout_pcm.c: PCM audio output functions * aout_pcm.c: PCM audio output functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2002 VideoLAN * Copyright (C) 1999-2002 VideoLAN
* $Id: aout_pcm.c,v 1.4 2002/04/30 12:56:11 gbazin Exp $ * $Id: aout_pcm.c,v 1.5 2002/05/18 15:51:37 gbazin Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr> * Cyril Deguet <asmax@via.ecp.fr>
...@@ -300,6 +300,11 @@ static int NextFrame( aout_thread_t * p_aout, aout_fifo_t * p_fifo, ...@@ -300,6 +300,11 @@ static int NextFrame( aout_thread_t * p_aout, aout_fifo_t * p_fifo,
/* We take the lock */ /* We take the lock */
vlc_mutex_lock( &p_fifo->data_lock ); vlc_mutex_lock( &p_fifo->data_lock );
if ( p_fifo->b_die )
{
vlc_mutex_unlock( &p_fifo->data_lock );
return( -1 );
}
/* Are we looking for a dated start frame ? */ /* Are we looking for a dated start frame ? */
if ( !p_fifo->b_start_frame ) if ( !p_fifo->b_start_frame )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment