Commit 88bab779 authored by Michel Kaempf's avatar Michel Kaempf

* input/input_pcr.c :

- Correction d'un bug de la fonction input_PcrReInit : pthread_mutex_lock()
�tait appel�e avec un argument obtenu en d�r�f�ren�ant un pointeur non
initialis� ;
- Le bug ne survenait que lorsque le vlc �tait compil� SANS -Ox, probablement
parce que le code optimis� n'ex�cutait pas les instructions dans le meme
ordre ;

-- MaXX
parent 1d5f5602
......@@ -27,25 +27,23 @@
******************************************************************************/
void input_PcrReInit( input_thread_t *p_input )
{
pcr_descriptor_t* p_pcr;
ASSERT(p_input);
pthread_mutex_lock( &p_pcr->lock );
p_pcr = p_input->p_pcr;
p_pcr->delta_clock = 0;
p_pcr->c_average = 0;
p_pcr->c_pts = 0;
pthread_mutex_lock( &p_input->p_pcr->lock );
#ifdef STATS
p_pcr->c_average_jitter = 0;
p_pcr->c_pcr = 0;
p_pcr->max_jitter = 0;
p_input->p_pcr->delta_clock = 0;
p_input->p_pcr->c_average = 0;
p_input->p_pcr->c_pts = 0;
/* For the printf in input_PcrDecode(), this is used for debug purpose only */
#ifdef STATS
p_input->p_pcr->c_average_jitter = 0;
p_input->p_pcr->c_pcr = 0;
p_input->p_pcr->max_jitter = 0;
/* For the printf in input_PcrDecode() (for debug purpose only) */
printf("\n");
#endif
pthread_mutex_unlock( &p_pcr->lock );
pthread_mutex_unlock( &p_input->p_pcr->lock );
}
/******************************************************************************
......
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