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

input: fix floating point comparison

The value is later used as single precision, so the comparison has to
have single precision too.
parent 9483c8c4
......@@ -956,15 +956,13 @@ static void LoadSubtitles( input_thread_t *p_input )
{
/* Load subtitles */
/* Get fps and set it if not already set */
const double f_fps = p_input->p->f_fps;
if( f_fps > 1.0 )
const float f_fps = p_input->p->f_fps;
if( f_fps > 1.f )
{
float f_requested_fps;
var_Create( p_input, "sub-original-fps", VLC_VAR_FLOAT );
var_SetFloat( p_input, "sub-original-fps", f_fps );
f_requested_fps = var_CreateGetFloat( p_input, "sub-fps" );
float f_requested_fps = var_CreateGetFloat( p_input, "sub-fps" );
if( f_requested_fps != f_fps )
{
var_Create( p_input, "sub-fps", VLC_VAR_FLOAT|
......
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