[vlc-devel] [PATCH 3/3] es_out: setup the output clock for low-delay

Thomas Guillem thomas at gllm.fr
Thu Dec 5 10:46:45 CET 2019


---
 src/input/es_out.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index 9b25dd7db69..9407c2377bf 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -1355,6 +1355,12 @@ static es_out_pgrm_t *EsOutProgramAdd( es_out_t *out, int i_group )
     input_clock_SetJitter( p_pgrm->p_input_clock, pts_delay, p_sys->i_cr_average );
     vlc_clock_main_SetInputDejitter( p_pgrm->p_main_clock, pts_delay );
 
+    /* In case of low delay: don't use any output dejitter. This may result on
+     * some audio/video glitches when starting, but low-delay is more important
+     * than the visual quality if the user chose this option. */
+    if (input_priv(p_input)->b_low_delay)
+        vlc_clock_main_SetDejitter(p_pgrm->p_main_clock, 0);
+
     /* Append it */
     vlc_list_append(&p_pgrm->node, &p_sys->programs);
 
-- 
2.20.1



More information about the vlc-devel mailing list