[vlc-commits] input: simplify fps variable handling
Thomas Guillem
git at videolan.org
Wed Jul 18 18:07:00 CEST 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jul 18 13:03:12 2018 +0200| [1b31b815aeb42bf0de757827e40487ee24e787da] | committer: Thomas Guillem
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1b31b815aeb42bf0de757827e40487ee24e787da
---
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 76abd780a3..f5a7c207c4 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" );
More information about the vlc-commits
mailing list