Changeset 4cc4c675d99ac00cce22edf44154c5379e051bff

Show
Ignore:
Timestamp:
14/05/08 15:21:15 (5 months ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1210771275 +0200
git-parent:

[22dbee0081c2f38a775d059175f4a9b21841d38c]

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

Revert [42a0d047849f391a75432dfdf5d71523d6ec08c7]

The kept sout needs to be attached to the playlist, else we will
try to destroy vlm's souts before it's time to.

Files:

Legend:

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

    r82921f3 r4cc4c67  
    14201420    if( b_keep_sout ) 
    14211421    { 
    1422         p_sout = vlc_object_find( p_parent->p_libvlc, VLC_OBJECT_SOUT, 
    1423                                                       FIND_CHILD ); 
    1424         if( p_sout ) 
    1425         { 
    1426             if( p_sout->p_parent != VLC_OBJECT( p_sout->p_libvlc ) ) 
    1427             { 
    1428                 vlc_object_release( p_sout ); 
    1429                 p_sout = NULL; 
    1430             } 
    1431             else 
    1432             { 
    1433                 vlc_object_detach( p_sout );    /* Remove it from the GC */ 
    1434                 vlc_object_release( p_sout ); 
    1435             } 
     1422        playlist_t *p_playlist = vlc_object_find( p_parent->p_libvlc, 
     1423                VLC_OBJECT_PLAYLIST, FIND_CHILD ); 
     1424        if( p_playlist ) 
     1425        { 
     1426            vlc_mutex_lock( &p_playlist->gc_lock ); 
     1427            p_sout = vlc_object_find( p_playlist, VLC_OBJECT_SOUT, FIND_CHILD ); 
     1428            if( p_sout ) 
     1429            { 
     1430                if( p_sout->p_parent != VLC_OBJECT( p_playlist ) ) 
     1431                { 
     1432                    vlc_object_release( p_sout ); 
     1433                    p_sout = NULL; 
     1434                } 
     1435                else 
     1436                { 
     1437                    vlc_object_detach( p_sout );    /* Remove it from the GC */ 
     1438                    vlc_object_release( p_sout ); 
     1439                } 
     1440            } 
     1441            vlc_mutex_unlock( &p_playlist->gc_lock ); 
     1442            vlc_object_release( p_playlist ); 
    14361443        } 
    14371444    } 
     
    14451452static void SoutKeep( sout_instance_t *p_sout ) 
    14461453{ 
     1454    playlist_t * p_playlist = vlc_object_find( p_sout, VLC_OBJECT_PLAYLIST, 
     1455                                                FIND_PARENT ); 
     1456    if( !p_playlist ) return; 
     1457 
    14471458    msg_Dbg( p_sout, "sout has been kept" ); 
    1448     vlc_object_attach( p_sout, p_sout->p_libvlc ); 
     1459    vlc_object_attach( p_sout, p_playlist ); 
     1460 
     1461    vlc_object_release( p_playlist ); 
    14491462} 
    14501463 
  • src/libvlc-common.c

    r82921f3 r4cc4c67  
    961961 
    962962#ifdef ENABLE_SOUT 
     963    playlist_t         * p_playlist; 
    963964    sout_instance_t    * p_sout; 
    964965 
    965     p_sout = vlc_object_find( p_libvlc, VLC_OBJECT_SOUT, FIND_CHILD ); 
    966     if( p_sout ) 
    967     { 
    968         msg_Dbg( p_sout, "removing kept stream output" ); 
    969         vlc_object_detach( (vlc_object_t*)p_sout ); 
    970         vlc_object_release( (vlc_object_t*)p_sout ); 
    971         sout_DeleteInstance( p_sout ); 
     966    p_playlist = vlc_object_find( p_libvlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); 
     967    if( p_playlist ) 
     968    { 
     969        p_sout = vlc_object_find( p_playlist, VLC_OBJECT_SOUT, FIND_CHILD ); 
     970        if( p_sout ) 
     971        { 
     972            msg_Dbg( p_sout, "removing kept stream output" ); 
     973            vlc_object_detach( (vlc_object_t*)p_sout ); 
     974            vlc_object_release( (vlc_object_t*)p_sout ); 
     975            sout_DeleteInstance( p_sout ); 
     976        } 
     977 
     978        vlc_object_release( p_playlist ); 
    972979    } 
    973980