}
case INPUT_GET_VIDEO_FPS:
- {
- int i;
pf = (double*)va_arg( args, double * );
+
vlc_mutex_lock( &p_input->p->p_item->lock );
- *pf = p_input->p->input.f_fps;
- for( i = 0; i < p_input->p->i_slave && *pf <= 0.001; i++ )
- *pf = p_input->p->slave[i]->f_fps;
+ *pf = p_input->p->f_fps;
vlc_mutex_unlock( &p_input->p->p_item->lock );
return VLC_SUCCESS;
- }
case INPUT_ADD_SLAVE:
psz = (char*)va_arg( args, char * );
{
/* Load subtitles */
/* Get fps and set it if not already set */
- double f_fps;
- if( !demux_Control( p_input->p->input.p_demux, DEMUX_GET_FPS, &f_fps ) &&
- f_fps > 1.0 )
+ const double f_fps = p_input->p->f_fps;
+ if( f_fps > 1.0 )
{
float f_requested_fps;
vlc_mutex_unlock( &p_input->p->p_item->lock );
}
}
- if( !demux_Control( in->p_demux, DEMUX_GET_FPS, &f_fps ) )
+ if( !demux_Control( in->p_demux, DEMUX_GET_FPS, &f_fps ) && f_fps > 0.0 )
{
vlc_mutex_lock( &p_input->p->p_item->lock );
- in->f_fps = f_fps;
+ p_input->p->f_fps = f_fps;
vlc_mutex_unlock( &p_input->p->p_item->lock );
}
bool b_rescale_ts;
bool b_eof; /* eof of demuxer */
- double f_fps;
} input_source_t;
/* Global properties */
bool b_can_pause;
bool b_can_rate_control;
+ double f_fps;
+ /* Current state */
int i_rate;
bool b_recording;
- /* */
+
+ /* Playtime configuration */
int64_t i_start; /* :start-time,0 by default */
int64_t i_stop; /* :stop-time, 0 if none */
int64_t i_run; /* :run-time, 0 if none */