From 4050212fa63e65e9084376cba8c2afc9d3bde489 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Mon, 31 Mar 2008 13:42:50 +0200 Subject: [PATCH] input: SoutKeep() needs to pay attention to the cases where the playlist doesn't exists. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafaël Carré --- src/input/input.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/input/input.c b/src/input/input.c index befb73a0b6..6f1554f29a 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -1381,7 +1381,8 @@ static sout_instance_t *SoutFind( vlc_object_t *p_parent, input_item_t *p_item, if( b_keep_sout ) { /* Remove the sout from the playlist garbage collector */ - /* FIXME: we don't want to depend on the playlist */ + /* FIXME: we don't want to depend on the playlist, sout + * should be attached to libvlc */ playlist_t * p_playlist = vlc_object_find( p_parent, VLC_OBJECT_PLAYLIST, FIND_PARENT ); if( p_playlist ) @@ -1413,10 +1414,14 @@ static sout_instance_t *SoutFind( vlc_object_t *p_parent, input_item_t *p_item, return p_sout; } + static void SoutKeep( sout_instance_t *p_sout ) { - /* attach sout to the playlist */ - playlist_t *p_playlist = pl_Yield( p_sout ); + /* FIXME: we don't want to depend on the playlist, sout + * should be attached to libvlc */ + playlist_t * p_playlist = vlc_object_find( p_sout, VLC_OBJECT_PLAYLIST, + FIND_PARENT ); + if( !p_playlist ) return; msg_Dbg( p_sout, "sout has been kept" ); vlc_object_attach( p_sout, p_playlist ); -- 2.39.5