[vlc-devel] [RFC PATCH 4/8] playlist: start/stop vlc_renderer on new input

Thomas Guillem thomas at gllm.fr
Thu Feb 18 17:33:14 CET 2016


start/stop are no-op if no renderer was configured.
---
 src/playlist/thread.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/playlist/thread.c b/src/playlist/thread.c
index a348479..d80b487 100644
--- a/src/playlist/thread.c
+++ b/src/playlist/thread.c
@@ -33,6 +33,7 @@
 #include <vlc_interface.h>
 #include <vlc_playlist.h>
 #include <vlc_rand.h>
+#include <vlc_renderer.h>
 #include "playlist_internal.h"
 
 /*****************************************************************************
@@ -212,8 +213,10 @@ static bool PlayItem( playlist_t *p_playlist, playlist_item_t *p_item )
         var_AddCallback( p_input_thread, "intf-event",
                          InputEvent, p_playlist );
 
+        vlc_renderer_start( p_playlist, p_input_thread );
         if( input_Start( p_input_thread ) )
         {
+            vlc_renderer_stop( p_playlist );
             var_DelCallback( p_input_thread, "intf-event",
                              InputEvent, p_playlist );
             vlc_object_release( p_input_thread );
@@ -451,6 +454,7 @@ static void LoopInput( playlist_t *p_playlist )
         PL_DEBUG( "dead input" );
         PL_UNLOCK;
 
+        vlc_renderer_stop( p_playlist );
         var_SetAddress( p_playlist, "input-current", NULL );
 
         /* WARNING: Input resource manipulation and callback deletion are
-- 
2.7.0



More information about the vlc-devel mailing list