Skip to content
Snippets Groups Projects
Commit 31c5a858 authored by Thomas Guillem's avatar Thomas Guillem Committed by Steve Lhomme
Browse files

input_clock: fix wrong discontinuities with low rate

The system time move slower or faster when the input rate is not 1.
parent c20410d9
No related branches found
No related tags found
1 merge request!5749input_clock: fix wrong discontinuities with low rate
Pipeline #493278 passed with stage
in 23 minutes and 22 seconds
......@@ -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)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment