Skip to content

core: clock: fix VLC_CLOCK_MASTER_AUTO detection

Thomas Guillem requested to merge tguillem/vlc:es-out-clock-pace into master

This MR fixes a chicken-egg situation with the recently introduced VLC_CLOCK_MASTER_AUTO option.

The clock auto-detection was not working with some demuxers, that are creating an ES track or a program from the demux open callback. In that case, the b_can_pace_control variable from the input_thread_t was not initialized (set to true by default). Indeed, this variable is set up only after the demux is created.

Therefore, the clock source selection need to be handled later (after the program is created): when the first PCR is updated by example.

Merge request reports