Browse Source

input: es_out: reset buffering on PCR discontinuity

If PCR is going back to the past, flush the pipeline and reset the
buffering back to avoid waiting for the stream to catch-up with the old
reference, and avoid buffering more than what we requested, which would
shift the playback more from the live.
Alexandre Janniaux 3 years ago
parent
commit
0006f5316a
  1. 6
      src/input/es_out.c

6
src/input/es_out.c

@ -1185,6 +1185,12 @@ static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced )
&i_stream_duration, &i_system_duration ))
return;
if (i_stream_duration < 0)
{
EsOutChangePosition(out, true);
return;
}
vlc_tick_t i_preroll_duration = 0;
if( p_sys->i_preroll_end >= 0 )
i_preroll_duration = __MAX( p_sys->i_preroll_end - i_stream_start, 0 );

Loading…
Cancel
Save