[vlc-devel] [PATCH v2 7/7] input: rename vlc_input_event_times variables

Thomas Guillem thomas at gllm.fr
Thu Apr 1 15:30:12 UTC 2021


---
 src/input/input_internal.h |  4 ++--
 src/player/input.c         | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index f4bed76fe72..1196c027310 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -160,8 +160,8 @@ struct vlc_input_event_state
 
 struct vlc_input_event_times
 {
-    float percentage;
-    vlc_tick_t ms;
+    float position;
+    vlc_tick_t time;
     vlc_tick_t length;
 };
 
diff --git a/src/player/input.c b/src/player/input.c
index 49b001dfcb4..4f9b235e285 100644
--- a/src/player/input.c
+++ b/src/player/input.c
@@ -754,12 +754,12 @@ input_thread_Events(input_thread_t *input_thread,
             bool changed = false;
             vlc_tick_t system_date = VLC_TICK_INVALID;
 
-            if (event->times.ms != VLC_TICK_INVALID
-             && (input->time != event->times.ms
-              || input->position != event->times.percentage))
+            if (event->times.time != VLC_TICK_INVALID
+             && (input->time != event->times.time
+              || input->position != event->times.position))
             {
-                input->time = event->times.ms;
-                input->position = event->times.percentage;
+                input->time = event->times.time;
+                input->position = event->times.position;
                 system_date = vlc_tick_now();
                 changed = true;
                 vlc_player_SendEvent(player, on_position_changed,
-- 
2.30.0



More information about the vlc-devel mailing list