[vlc-commits] [Git][videolan/vlc][master] es_out: reset main clocks when terminating

Thomas Guillem gitlab at videolan.org
Tue Jun 1 13:07:26 UTC 2021



Thomas Guillem pushed to branch master at VideoLAN / VLC


Commits:
36596846 by Thomas Guillem at 2021-06-01T12:51:30+00:00
es_out: reset main clocks when terminating

Reset main clocks before unselecting every ESes. This will speed up
audio and video output termination. Indeed, they won't wait for a
specific PTS conversion. This may also unblock outputs in case of a
corrupted sample with a PTS very far in the future.

- - - - -


1 changed file:

- src/input/es_out.c


Changes:

=====================================
src/input/es_out.c
=====================================
@@ -3623,6 +3623,18 @@ static int EsOutVaPrivControlLocked( es_out_t *out, int query, va_list args )
         p_sys->b_active = i_mode != ES_OUT_MODE_NONE;
         p_sys->i_mode = i_mode;
 
+        if( i_mode == ES_OUT_MODE_NONE )
+        {
+            /* Reset main clocks before unselecting every ESes. This will speed
+             * up audio and video output termination. Indeed, they won't wait
+             * for a specific PTS conversion. This may also unblock outputs in
+             * case of a corrupted sample with a PTS very far in the future.
+             * */
+            es_out_pgrm_t *pgrm;
+            vlc_list_foreach(pgrm, &p_sys->programs, node)
+                vlc_clock_main_Reset(pgrm->p_main_clock);
+        }
+
         /* Reapply policy mode */
         es_out_id_t *es;
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/36596846205e64cb0c529586c50a4f3789a5c206

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/36596846205e64cb0c529586c50a4f3789a5c206
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list