# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <stdio.h> /* required */
-#include <assert.h>
-
#include "input/input_internal.h"
/*****************************************************************************
break;
}
}
- assert( p_counter );
TimerDump( p_obj, p_counter, true );
vlc_mutex_unlock( &priv->timer_lock );
}
case STATS_DERIVATIVE:
{
counter_sample_t *p_new, *p_old;
- if( mdate() - p_counter->last_update < p_counter->update_interval )
+ mtime_t now = mdate();
+ if( now - p_counter->last_update < p_counter->update_interval )
{
return VLC_EGENERIC;
}
- p_counter->last_update = mdate();
+ p_counter->last_update = now;
if( p_counter->i_type != VLC_VAR_FLOAT &&
p_counter->i_type != VLC_VAR_INTEGER )
{
static void TimerDump( vlc_object_t *p_obj, counter_t *p_counter,
bool b_total )
{
- assert( p_counter );
+ if( !p_counter )
+ return;
mtime_t last, total;
int i_total;