Commit 4a8a63dd authored by Michel Kaempf's avatar Michel Kaempf

* audio_decoder/audio_decoder.c :

- Test d'une nouvelle m�thode de synchro ;
parent 7cee752c
...@@ -846,6 +846,15 @@ static void RunThread( adec_thread_t * p_adec ) ...@@ -846,6 +846,15 @@ static void RunThread( adec_thread_t * p_adec )
{ {
vlc_cond_wait( &p_adec->p_aout_fifo->data_wait, &p_adec->p_aout_fifo->data_lock ); vlc_cond_wait( &p_adec->p_aout_fifo->data_wait, &p_adec->p_aout_fifo->data_lock );
} }
if ( DECODER_FIFO_START(p_adec->fifo)->b_has_pts )
{
p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = DECODER_FIFO_START(p_adec->fifo)->i_pts;
DECODER_FIFO_START(p_adec->fifo)->b_has_pts = 0;
}
else
{
p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = LAST_MDATE;
}
vlc_mutex_unlock( &p_adec->p_aout_fifo->data_lock ); vlc_mutex_unlock( &p_adec->p_aout_fifo->data_lock );
/* Decoding the frames */ /* Decoding the frames */
...@@ -853,6 +862,7 @@ static void RunThread( adec_thread_t * p_adec ) ...@@ -853,6 +862,7 @@ static void RunThread( adec_thread_t * p_adec )
{ {
vlc_mutex_lock( &p_adec->p_aout_fifo->data_lock ); vlc_mutex_lock( &p_adec->p_aout_fifo->data_lock );
/* Frame 1 */ /* Frame 1 */
/*
if ( DECODER_FIFO_START(p_adec->fifo)->b_has_pts ) if ( DECODER_FIFO_START(p_adec->fifo)->b_has_pts )
{ {
p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = DECODER_FIFO_START(p_adec->fifo)->i_pts; p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = DECODER_FIFO_START(p_adec->fifo)->i_pts;
...@@ -862,6 +872,7 @@ static void RunThread( adec_thread_t * p_adec ) ...@@ -862,6 +872,7 @@ static void RunThread( adec_thread_t * p_adec )
{ {
p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = LAST_MDATE; p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = LAST_MDATE;
} }
*/
p_adec->p_aout_fifo->l_end_frame = (p_adec->p_aout_fifo->l_end_frame + 1) & AOUT_FIFO_SIZE; p_adec->p_aout_fifo->l_end_frame = (p_adec->p_aout_fifo->l_end_frame + 1) & AOUT_FIFO_SIZE;
/* Frame 2 */ /* Frame 2 */
p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = LAST_MDATE; p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = LAST_MDATE;
......
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