[vlc-devel] [PATCH 1/2] input: reset pcr/clock and flush on over jitter

Francois Cartegnie fcvlcdev at free.fr
Thu Oct 17 13:55:10 CEST 2019


can't recover otherwise
---
 src/input/es_out.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index d62262d0bf..e8e6563268 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -3079,8 +3079,6 @@ static int EsOutVaControlLocked( es_out_t *out, int i_query, va_list args )
                 /* If the jitter increase is over our max or the total hits the maximum */
                 if( i_new_jitter > i_jitter_max || i_clock_total_delay > INPUT_PTS_DELAY_MAX )
                 {
-                    es_out_pgrm_t *pgrm;
-
                     msg_Err( p_sys->p_input,
                              "ES_OUT_SET_(GROUP_)PCR  is called %d ms late (jitter of %d ms ignored)",
                              (int)MS_FROM_VLC_TICK(i_late),
@@ -3088,13 +3086,6 @@ static int EsOutVaControlLocked( es_out_t *out, int i_query, va_list args )
 
                     /* don't change the current jitter */
                     i_new_jitter = p_sys->i_pts_jitter;
-
-                    /* and reset clock */
-                    vlc_list_foreach(pgrm, &p_sys->programs, node)
-                    {
-                        input_clock_Reset(pgrm->p_input_clock);
-                        vlc_clock_main_Reset(p_pgrm->p_main_clock);
-                    }
                 }
                 else
                 {
@@ -3102,11 +3093,11 @@ static int EsOutVaControlLocked( es_out_t *out, int i_query, va_list args )
                              "ES_OUT_SET_(GROUP_)PCR  is called %d ms late (pts_delay increased to %d ms)",
                              (int)MS_FROM_VLC_TICK(i_late),
                              (int)MS_FROM_VLC_TICK(i_clock_total_delay) );
-
-                    /* Force a rebufferization when we are too late */
-                    EsOutControlLocked( out, ES_OUT_RESET_PCR );
                 }
 
+                /* Force a rebufferization when we are too late */
+                EsOutControlLocked( out, ES_OUT_RESET_PCR );
+
                 EsOutControlLocked( out, ES_OUT_SET_JITTER,
                                     p_sys->i_pts_delay,
                                     i_new_jitter,
-- 
2.21.0



More information about the vlc-devel mailing list