-
-/*****************************************************************************
- * ac3_spdif_ErrorThread : ac3 spdif's RunThread() error loop
- *****************************************************************************/
-static void ac3_spdif_ErrorThread( ac3_spdif_thread_t * p_spdif )
-{
- /* We take the lock, because we are going to read/write the start/end
- * indexes of the decoder fifo */
- vlc_mutex_lock (&p_spdif->p_fifo->data_lock);
-
- /* Wait until a `die' order is sent */
- while( !p_spdif->p_fifo->b_die )
- {
- /* Trash all received PES packets */
- p_spdif->p_fifo->pf_delete_pes(
- p_spdif->p_fifo->p_packets_mgt,
- p_spdif->p_fifo->p_first );
-
- /* Waiting for the input thread to put new PES packets in the fifo */
- vlc_cond_wait( &p_spdif->p_fifo->data_wait,
- &p_spdif->p_fifo->data_lock );
- }
-
- /* We can release the lock before leaving */
- vlc_mutex_unlock( &p_spdif->p_fifo->data_lock );
-}
-