Commit 08addc5a authored by Christophe Mutricy's avatar Christophe Mutricy

Fix a bunch of segfaults. It may be heavy handed and breaking other stuffs. zorglub to review

parent 28422e78
......@@ -699,7 +699,9 @@ static int Init( input_thread_t * p_input, vlc_bool_t b_quick )
p_input->counters.p_sout_send_bitrate = NULL;
p_input->counters.p_sout_sent_packets = NULL;
p_input->counters.p_sout_sent_bytes = NULL;
if( p_input->counters.p_demux_bitrate )
p_input->counters.p_demux_bitrate->update_interval = 1000000;
if( p_input->counters.p_input_bitrate )
p_input->counters.p_input_bitrate->update_interval = 1000000;
vlc_mutex_init( p_input, &p_input->counters.counters_lock );
......@@ -718,6 +720,7 @@ static int Init( input_thread_t * p_input, vlc_bool_t b_quick )
INIT_COUNTER( sout_sent_packets, INTEGER, COUNTER );
INIT_COUNTER (sout_sent_bytes, INTEGER, COUNTER );
INIT_COUNTER( sout_send_bitrate, FLOAT, DERIVATIVE );
if( p_input->counters.p_sout_send_bitrate )
p_input->counters.p_sout_send_bitrate->update_interval = 1000000;
}
free( psz );
......
......@@ -380,6 +380,8 @@ void __stats_TimersClean( vlc_object_t *p_obj )
void stats_CounterClean( counter_t *p_c )
{
int i;
if( p_c )
{
for( i = p_c->i_samples - 1 ; i >= 0 ; i-- )
{
counter_sample_t *p_s = p_c->pp_samples[i];
......@@ -388,6 +390,7 @@ void stats_CounterClean( counter_t *p_c )
}
if( p_c->psz_name ) free( p_c->psz_name );
free( p_c );
}
}
......
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