Changeset 42a0d047849f391a75432dfdf5d71523d6ec08c7

Show
Ignore:
Timestamp:
04/20/08 21:08:50 (3 months ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1208718530 +0200
git-parent:

[fb388c4667e28c606b15ba42f76fbde6fdaa173b]

git-author:
Rafaël Carré <funman@videolan.org> 1208718515 +0200
Message:

Attach the sout object to libvlc

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/input/input.c

    rdee3c9c r42a0d04  
    14141414    if( b_keep_sout ) 
    14151415    { 
    1416         /* Remove the sout from the playlist garbage collector */ 
    1417         /* FIXME: we don't want to depend on the playlist, sout 
    1418          * should be attached to libvlc */ 
    1419         playlist_t * p_playlist = vlc_object_find( p_parent, 
    1420             VLC_OBJECT_PLAYLIST, FIND_PARENT ); 
    1421         if( p_playlist ) 
    1422         { 
    1423             vlc_mutex_lock( &p_playlist->gc_lock ); 
    1424             p_sout = vlc_object_find( p_playlist, VLC_OBJECT_SOUT, FIND_CHILD ); 
    1425             if( p_sout ) 
    1426             { 
    1427                 if( p_sout->p_parent != VLC_OBJECT(p_playlist) ) 
    1428                 { 
    1429                     vlc_object_release( p_sout ); 
    1430                     p_sout = NULL; 
    1431                 } 
    1432                 else 
    1433                 { 
    1434                     vlc_object_detach( p_sout );    /* Remove it from the GC */ 
    1435  
    1436                     vlc_object_release( p_sout ); 
    1437                 } 
    1438             } 
    1439             vlc_mutex_unlock( &p_playlist->gc_lock ); 
    1440  
    1441             vlc_object_release( p_playlist ); 
     1416        p_sout = vlc_object_find( p_parent->p_libvlc, VLC_OBJECT_SOUT, 
     1417                                                      FIND_CHILD ); 
     1418        if( p_sout ) 
     1419        { 
     1420            if( p_sout->p_parent != VLC_OBJECT( p_sout->p_libvlc ) ) 
     1421            { 
     1422                vlc_object_release( p_sout ); 
     1423                p_sout = NULL; 
     1424            } 
     1425            else 
     1426            { 
     1427                vlc_object_detach( p_sout );    /* Remove it from the GC */ 
     1428                vlc_object_release( p_sout ); 
     1429            } 
    14421430        } 
    14431431    } 
     
    14511439static void SoutKeep( sout_instance_t *p_sout ) 
    14521440{ 
    1453     /* FIXME: we don't want to depend on the playlist, sout 
    1454      * should be attached to libvlc */ 
    1455     playlist_t * p_playlist = vlc_object_find( p_sout, VLC_OBJECT_PLAYLIST, 
    1456                                                FIND_PARENT ); 
    1457     if( !p_playlist ) return; 
    1458  
    14591441    msg_Dbg( p_sout, "sout has been kept" ); 
    1460     vlc_object_attach( p_sout, p_playlist ); 
    1461  
    1462     pl_Release( p_sout ); 
     1442    vlc_object_attach( p_sout, p_sout->p_libvlc ); 
    14631443} 
    14641444