[vlc-commits] [Git][videolan/vlc][master] input_clock: fix wrong discontinuities with low rate
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Jul 19 06:49:34 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
31c5a858 by Thomas Guillem at 2024-07-19T06:14:34+00:00
input_clock: fix wrong discontinuities with low rate
The system time move slower or faster when the input rate is not 1.
- - - - -
1 changed file:
- src/clock/input_clock.c
Changes:
=====================================
src/clock/input_clock.c
=====================================
@@ -241,7 +241,7 @@ vlc_tick_t input_clock_Update( input_clock_t *cl, vlc_object_t *p_log,
/* We need compare both stream and system times for discontinuity.
* Indeed, a big stream diff is OK if we have the same system diff. */
vlc_tick_t stream_diff = i_ck_stream - cl->last.stream;
- vlc_tick_t system_diff = i_ck_system - cl->last.system;
+ vlc_tick_t system_diff = (i_ck_system - cl->last.system) * cl->rate;
vlc_tick_t diff = stream_diff - system_diff;
if (diff > CR_MAX_GAP || diff < -CR_MAX_GAP)
{
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/31c5a858a4665dcf5c6ab53e6c89bb5ae904f808
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/31c5a858a4665dcf5c6ab53e6c89bb5ae904f808
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