[vlc-commits] vlm: use float for rate
Thomas Guillem
git at videolan.org
Fri Feb 15 16:38:10 CET 2019
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Feb 15 16:06:35 2019 +0100| [e1edafe2d7191c0bdcb16a1d30fec30442987cce] | committer: Thomas Guillem
vlm: use float for rate
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e1edafe2d7191c0bdcb16a1d30fec30442987cce
---
include/vlc_vlm.h | 4 ++--
src/input/vlm.c | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/vlc_vlm.h b/include/vlc_vlm.h
index 91113db9ea..1257b71a44 100644
--- a/include/vlc_vlm.h
+++ b/include/vlc_vlm.h
@@ -76,7 +76,7 @@ typedef struct
int64_t i_length; /*< vlm media instance vlm media item length */
double d_position; /*< vlm media instance position in stream */
bool b_paused; /*< vlm media instance is paused */
- int i_rate; // normal is INPUT_RATE_DEFAULT
+ float f_rate; // normal is 1.0f
} vlm_media_instance_t;
#if 0
@@ -324,7 +324,7 @@ static inline void vlm_media_instance_Init( vlm_media_instance_t *p_instance )
p_instance->i_length = 0;
p_instance->d_position = 0.0;
p_instance->b_paused = false;
- p_instance->i_rate = INPUT_RATE_DEFAULT;
+ p_instance->f_rate = 1.0f;
}
/**
diff --git a/src/input/vlm.c b/src/input/vlm.c
index b62eace026..e7a1aa9a9a 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -1126,8 +1126,7 @@ static int vlm_ControlMediaInstanceGets( vlm_t *p_vlm, int64_t id, vlm_media_ins
p_idsc->d_position = var_GetFloat( p_instance->p_input, "position" );
if( var_GetInteger( p_instance->p_input, "state" ) == PAUSE_S )
p_idsc->b_paused = true;
- p_idsc->i_rate = INPUT_RATE_DEFAULT
- / var_GetFloat( p_instance->p_input, "rate" );
+ p_idsc->f_rate = var_GetFloat( p_instance->p_input, "rate" );
}
TAB_APPEND( i_idsc, pp_idsc, p_idsc );
More information about the vlc-commits
mailing list