[vlc-devel] [PATCH 15/17] player/timer: rename last_ts to last_video_ts

Thomas Guillem thomas at gllm.fr
Mon Feb 15 10:15:10 UTC 2021


---
 src/player/player.h |  2 +-
 src/player/timer.c  | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/player/player.h b/src/player/player.h
index 00f470f61a0..6dcc61ac558 100644
--- a/src/player/player.h
+++ b/src/player/player.h
@@ -219,7 +219,7 @@ struct vlc_player_timer
     vlc_tick_t input_time;
     vlc_tick_t input_length;
     vlc_tick_t input_normal_time;
-    vlc_tick_t last_ts;
+    vlc_tick_t last_video_ts;
     float input_position;
 
     struct vlc_player_timer_source sources[VLC_PLAYER_TIMER_TYPE_COUNT];
diff --git a/src/player/timer.c b/src/player/timer.c
index 3e56df64c7d..4ee870c76e2 100644
--- a/src/player/timer.c
+++ b/src/player/timer.c
@@ -35,7 +35,7 @@ vlc_player_ResetTimer(vlc_player_t *player)
     player->timer.has_clock_source = false;
     player->timer.input_length = VLC_TICK_INVALID;
     player->timer.input_normal_time = VLC_TICK_0;
-    player->timer.last_ts = VLC_TICK_INVALID;
+    player->timer.last_video_ts = VLC_TICK_INVALID;
     player->timer.input_position = 0.f;
     player->timer.smpte_source.smpte.last_framenum = ULONG_MAX;
 
@@ -293,14 +293,14 @@ vlc_player_UpdateTimer(vlc_player_t *player, vlc_es_id_t *es_source,
              && normal_time != VLC_TICK_INVALID)
             {
                 player->timer.input_normal_time = normal_time;
-                player->timer.last_ts = VLC_TICK_INVALID;
+                player->timer.last_video_ts = VLC_TICK_INVALID;
                 force_update = true;
             }
             if (player->timer.input_length != point->length
              && point->length >= VLC_TICK_0)
             {
                 player->timer.input_length = point->length;
-                player->timer.last_ts = VLC_TICK_INVALID;
+                player->timer.last_video_ts = VLC_TICK_INVALID;
                 force_update = true;
             }
 
@@ -369,12 +369,12 @@ vlc_player_UpdateTimer(vlc_player_t *player, vlc_es_id_t *es_source,
          || frame_rate_base != source->smpte.frame_rate_base))
         {
             assert(frame_rate_base != 0);
-            player->timer.last_ts = VLC_TICK_INVALID;
+            player->timer.last_video_ts = VLC_TICK_INVALID;
             vlc_player_UpdateSmpteTimerFPS(player, source, frame_rate,
                                            frame_rate_base);
         }
 
-        if (point->ts != player->timer.last_ts && source->smpte.frame_rate != 0)
+        if (point->ts != player->timer.last_video_ts && source->smpte.frame_rate != 0)
         {
             vlc_player_UpdateTimerSource(player, source, point->rate, point->ts,
                                          system_date);
@@ -383,7 +383,7 @@ vlc_player_UpdateTimer(vlc_player_t *player, vlc_es_id_t *es_source,
                 vlc_player_SendSmpteTimerSourceUpdates(player, source,
                                                        &source->point);
         }
-        player->timer.last_ts = point->ts;
+        player->timer.last_video_ts = point->ts;
     }
     vlc_mutex_unlock(&player->timer.lock);
 }
-- 
2.30.0



More information about the vlc-devel mailing list