Commit cf5951e9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

input: do not clobber master frame rate

parent 37c38fd3
......@@ -912,7 +912,7 @@ static void LoadSubtitles( input_thread_t *p_input )
{
/* Load subtitles */
/* Get fps and set it if not already set */
const float f_fps = p_input->p->f_fps;
const float f_fps = p_input->p->master->f_fps;
if( f_fps > 1.f )
{
var_Create( p_input, "sub-original-fps", VLC_VAR_FLOAT );
......@@ -2095,7 +2095,6 @@ static input_source_t *InputSourceNew( input_thread_t *p_input,
return NULL;
const char *psz_access, *psz_demux, *psz_path, *psz_anchor = NULL;
double f_fps;
assert( psz_mrl );
char *psz_dup = strdup( psz_mrl );
......@@ -2272,8 +2271,8 @@ static input_source_t *InputSourceNew( input_thread_t *p_input,
in->i_pts_delay = 0;
}
if( !demux_Control( in->p_demux, DEMUX_GET_FPS, &f_fps ) && f_fps > 0.0 )
p_input->p->f_fps = f_fps;
if( demux_Control( in->p_demux, DEMUX_GET_FPS, &in->f_fps ) )
in->f_fps = 0.f;
if( var_GetInteger( p_input, "clock-synchro" ) != -1 )
in->b_can_pace_control = !var_GetInteger( p_input, "clock-synchro" );
......
......@@ -63,6 +63,7 @@ typedef struct
bool b_can_rate_control;
bool b_can_stream_record;
bool b_rescale_ts;
double f_fps;
/* */
int64_t i_pts_delay;
......@@ -81,7 +82,6 @@ typedef struct
struct input_thread_private_t
{
/* Global properties */
double f_fps;
bool b_can_pause;
bool b_can_rate_control;
bool b_can_pace_control;
......
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