Changeset 4cc4c675d99ac00cce22edf44154c5379e051bff
- 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
| r82921f3 |
r4cc4c67 |
|
| 1420 | 1420 | if( b_keep_sout ) |
|---|
| 1421 | 1421 | { |
|---|
| 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 ); |
|---|
| 1436 | 1443 | } |
|---|
| 1437 | 1444 | } |
|---|
| … | … | |
| 1445 | 1452 | static void SoutKeep( sout_instance_t *p_sout ) |
|---|
| 1446 | 1453 | { |
|---|
| | 1454 | playlist_t * p_playlist = vlc_object_find( p_sout, VLC_OBJECT_PLAYLIST, |
|---|
| | 1455 | FIND_PARENT ); |
|---|
| | 1456 | if( !p_playlist ) return; |
|---|
| | 1457 | |
|---|
| 1447 | 1458 | 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 ); |
|---|
| 1449 | 1462 | } |
|---|
| 1450 | 1463 | |
|---|
| r82921f3 |
r4cc4c67 |
|
| 961 | 961 | |
|---|
| 962 | 962 | #ifdef ENABLE_SOUT |
|---|
| | 963 | playlist_t * p_playlist; |
|---|
| 963 | 964 | sout_instance_t * p_sout; |
|---|
| 964 | 965 | |
|---|
| 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 ); |
|---|
| 972 | 979 | } |
|---|
| 973 | 980 | |
|---|