Changeset d9810ce021930691108ea74812d4ce6f5e3df547
- Timestamp:
- 06/07/08 09:31:17
(3 months ago)
- Author:
- Rémi Denis-Courmont <rdenis@simphalempin.com>
- git-committer:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1212823877 +0300
- git-parent:
[872bfb52d2563c38c8fe3f4c831d2503d3f3a104]
- git-author:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1212823877 +0300
- Message:
Untriplicate vout release code - fix #1593
Unused video outputs are currently attached to libvlc, so there is no
point in destroying them from the playlist (twice), then from libvlc.
This should also fix #1593 (multiple vout free).
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| ra032983 |
rd9810ce |
|
| 29 | 29 | #include <assert.h> |
|---|
| 30 | 30 | #include <vlc_common.h> |
|---|
| 31 | | #include <vlc_vout.h> |
|---|
| 32 | 31 | #include <vlc_sout.h> |
|---|
| 33 | 32 | #include <vlc_playlist.h> |
|---|
| … | … | |
| 197 | 196 | |
|---|
| 198 | 197 | vlc_mutex_lock( &p_playlist->gc_lock ); |
|---|
| 199 | | while( ( p_obj = vlc_object_find( p_playlist->p_libvlc, VLC_OBJECT_VOUT, |
|---|
| 200 | | FIND_CHILD ) ) ) |
|---|
| 201 | | { |
|---|
| 202 | | if( p_obj->p_parent != VLC_OBJECT(p_playlist->p_libvlc) ) |
|---|
| 203 | | { |
|---|
| 204 | | vlc_object_release( p_obj ); |
|---|
| 205 | | break; |
|---|
| 206 | | } |
|---|
| 207 | | msg_Dbg( p_playlist, "garbage collector destroying 1 vout" ); |
|---|
| 208 | | vlc_object_detach( p_obj ); |
|---|
| 209 | | vlc_object_release( p_obj ); |
|---|
| 210 | | vlc_object_release( (vout_thread_t *)p_obj ); |
|---|
| 211 | | } |
|---|
| 212 | 198 | p_playlist->b_cant_sleep = false; |
|---|
| 213 | 199 | vlc_mutex_unlock( &p_playlist->gc_lock ); |
|---|
| … | … | |
| 430 | 416 | sout_DeleteInstance( p_sout ); |
|---|
| 431 | 417 | #endif |
|---|
| 432 | | |
|---|
| 433 | | /* close all remaining vout */ |
|---|
| 434 | | while( ( p_obj = vlc_object_find( p_playlist, |
|---|
| 435 | | VLC_OBJECT_VOUT, FIND_CHILD ) ) ) |
|---|
| 436 | | { |
|---|
| 437 | | vlc_object_detach( p_obj ); |
|---|
| 438 | | vlc_object_release( p_obj ); |
|---|
| 439 | | vlc_object_release( (vout_thread_t *)p_obj ); |
|---|
| 440 | | } |
|---|
| 441 | 418 | |
|---|
| 442 | 419 | while( p_playlist->i_sds ) |
|---|
| r4f96ebd |
rd9810ce |
|
| 125 | 125 | if( !p_fmt ) |
|---|
| 126 | 126 | { |
|---|
| 127 | | /* Reattach video output to playlist before bailing out */ |
|---|
| | 127 | /* Reattach video output to the instance before bailing out */ |
|---|
| 128 | 128 | if( p_vout ) |
|---|
| 129 | 129 | { |
|---|