From 1b31b815aeb42bf0de757827e40487ee24e787da Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Wed, 18 Jul 2018 13:03:12 +0200
Subject: [PATCH] input: simplify fps variable handling

This commit merge "sub-original-fps" and "sub-fps" variables into one. The
"sub-fps" will be always valid. It will be, by priority order, the user choice,
then the master demux fps.
---
 src/input/input.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index 76abd780a377..f5a7c207c4e4 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -978,16 +978,9 @@ static void SetSubtitlesOptions( input_thread_t *p_input )
     const float f_fps = input_priv(p_input)->master->f_fps;
     if( f_fps > 1.f )
     {
-        var_Create( p_input, "sub-original-fps", VLC_VAR_FLOAT );
-        var_SetFloat( p_input, "sub-original-fps", f_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|
-                                            VLC_VAR_DOINHERIT );
-            var_SetFloat( p_input, "sub-fps", f_requested_fps );
-        }
+        if( f_requested_fps <= 1.f )
+            var_SetFloat( p_input, "sub-fps", f_fps );
     }
 
     const int i_delay = var_CreateGetInteger( p_input, "sub-delay" );
-- 
GitLab