[vlc-devel] commit: input: SoutKeep() needs to pay attention to the cases where the playlist doesn't exists. ( Pierre d'Herbemont )
git version control
git at videolan.org
Mon Mar 31 13:44:13 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Mon Mar 31 13:42:50 2008 +0200| [4050212fa63e65e9084376cba8c2afc9d3bde489]
input: SoutKeep() needs to pay attention to the cases where the playlist doesn't exists.
Signed-off-by: Rafaël Carré <funman at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4050212fa63e65e9084376cba8c2afc9d3bde489
---
src/input/input.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index befb73a..6f1554f 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 );
More information about the vlc-devel
mailing list