Browse Source

input_clock: fix wrong discontinuities with low rate

The system time move slower or faster when the input rate is not 1.
pull/165/head
Thomas Guillem 2 years ago
committed by Steve Lhomme
parent
commit
31c5a858a4
  1. 2
      src/clock/input_clock.c

2
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)
{

Loading…
Cancel
Save