Skip to content
Snippets Groups Projects
Commit 42b767af authored by François Cartegnie's avatar François Cartegnie :fingers_crossed: Committed by Steve Lhomme
Browse files

input: use double for vlc_tick_t conversions

1111 becomes 1111000064 due to imprecision
parent a89c7662
No related branches found
No related tags found
1 merge request!2429input: use double for vlc_tick_t conversions
Pipeline #257393 passed with stages
in 26 minutes and 48 seconds
......@@ -869,14 +869,14 @@ static void StartTitle( input_thread_t * p_input )
input_ControlPushHelper( p_input, INPUT_CONTROL_SET_SEEKPOINT, &val );
/* Start/stop/run time */
priv->i_start = llroundf((float)CLOCK_FREQ
* var_GetFloat( p_input, "start-time" ));
priv->i_stop = llroundf((float)CLOCK_FREQ
* var_GetFloat( p_input, "stop-time" ));
priv->i_start = llroundl(CLOCK_FREQ *
(double) var_GetFloat( p_input, "start-time" ));
priv->i_stop = llroundl(CLOCK_FREQ *
(double) var_GetFloat( p_input, "stop-time" ));
if( priv->i_stop <= 0 )
{
priv->i_stop = llroundf((float)CLOCK_FREQ
* var_GetFloat( p_input, "run-time" ));
priv->i_stop = llroundl(CLOCK_FREQ *
(double) var_GetFloat( p_input, "run-time" ));
if( priv->i_stop < 0 )
{
msg_Warn( p_input, "invalid run-time ignored" );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment