[vlc-commits] [Git][videolan/vlc][master] player: fix vlc_player_GetTime() while paused
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Sat May 10 20:12:45 UTC 2025
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
e6dde2f2 by Thomas Guillem at 2025-05-10T19:30:35+00:00
player: fix vlc_player_GetTime() while paused
In the case where an ES did not send an update after being paused
(likely when audio only), the last timer point was still valid causing
the Interpolate function to continue.
Do check for paused before interpolating a point.
Fixes #28353
The issue was only visible when using vlc_player_GetTime() and
libvlc_media_player_get_time() (so, no problem for Qt that is using the
timer API).
- - - - -
1 changed file:
- src/player/timer.c
Changes:
=====================================
src/player/timer.c
=====================================
@@ -547,11 +547,19 @@ vlc_player_GetTimerPoint(vlc_player_t *player, bool seeking,
if (player->timer.best_source.point.system_date == VLC_TICK_INVALID)
goto end;
- if (system_now != VLC_TICK_INVALID)
+ if (system_now != VLC_TICK_INVALID && !player->timer.paused)
ret = vlc_player_timer_point_Interpolate(&player->timer.best_source.point,
system_now, out_ts, out_pos);
else
+ {
+ const struct vlc_player_timer_point *point =
+ &player->timer.best_source.point;
+ if (out_ts)
+ *out_ts = point->ts;
+ if (out_pos)
+ *out_pos = point->position;
ret = VLC_SUCCESS;
+ }
end:
vlc_mutex_unlock(&player->timer.lock);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e6dde2f2164a933862d460ea09f9fe87a92a8cef
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e6dde2f2164a933862d460ea09f9fe87a92a8cef
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list