[vlc-devel] [PATCH 3/3] player: timer: fix spurious wakeups from pause

Francois Cartegnie fcvlcdev at free.fr
Mon Dec 14 18:51:44 CET 2020


---
 src/player/timer.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/player/timer.c b/src/player/timer.c
index c6242212cc..beca7b68af 100644
--- a/src/player/timer.c
+++ b/src/player/timer.c
@@ -331,8 +331,11 @@ vlc_player_UpdateTimer(vlc_player_t *player, vlc_es_id_t *es_source,
           || source->point.system_date != point->system_date
           || point->system_date != INT64_MAX)
         {
+            vlc_tick_t system_date = point->system_date;
+            if(player->timer.state == VLC_PLAYER_TIMER_STATE_PAUSED && system_date != INT64_MAX)
+                system_date = INT64_MAX;
             vlc_player_UpdateTimerSource(player, source, point->rate, point->ts,
-                                         point->system_date);
+                                         system_date);
 
             if (!vlc_list_is_empty(&source->listeners))
                 vlc_player_SendTimerSourceUpdates(player, source, force_update,
-- 
2.26.2



More information about the vlc-devel mailing list