Commit d9810ce0 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

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).
parent 872bfb52
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <assert.h> #include <assert.h>
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_vout.h>
#include <vlc_sout.h> #include <vlc_sout.h>
#include <vlc_playlist.h> #include <vlc_playlist.h>
#include <vlc_interface.h> #include <vlc_interface.h>
...@@ -196,19 +195,6 @@ static void ObjectGarbageCollector( playlist_t *p_playlist, bool b_force ) ...@@ -196,19 +195,6 @@ static void ObjectGarbageCollector( playlist_t *p_playlist, bool b_force )
} }
vlc_mutex_lock( &p_playlist->gc_lock ); vlc_mutex_lock( &p_playlist->gc_lock );
while( ( p_obj = vlc_object_find( p_playlist->p_libvlc, VLC_OBJECT_VOUT,
FIND_CHILD ) ) )
{
if( p_obj->p_parent != VLC_OBJECT(p_playlist->p_libvlc) )
{
vlc_object_release( p_obj );
break;
}
msg_Dbg( p_playlist, "garbage collector destroying 1 vout" );
vlc_object_detach( p_obj );
vlc_object_release( p_obj );
vlc_object_release( (vout_thread_t *)p_obj );
}
p_playlist->b_cant_sleep = false; p_playlist->b_cant_sleep = false;
vlc_mutex_unlock( &p_playlist->gc_lock ); vlc_mutex_unlock( &p_playlist->gc_lock );
} }
...@@ -430,15 +416,6 @@ void playlist_LastLoop( playlist_t *p_playlist ) ...@@ -430,15 +416,6 @@ void playlist_LastLoop( playlist_t *p_playlist )
sout_DeleteInstance( p_sout ); sout_DeleteInstance( p_sout );
#endif #endif
/* close all remaining vout */
while( ( p_obj = vlc_object_find( p_playlist,
VLC_OBJECT_VOUT, FIND_CHILD ) ) )
{
vlc_object_detach( p_obj );
vlc_object_release( p_obj );
vlc_object_release( (vout_thread_t *)p_obj );
}
while( p_playlist->i_sds ) while( p_playlist->i_sds )
{ {
playlist_ServicesDiscoveryRemove( p_playlist, playlist_ServicesDiscoveryRemove( p_playlist,
......
...@@ -124,7 +124,7 @@ vout_thread_t *__vout_Request( vlc_object_t *p_this, vout_thread_t *p_vout, ...@@ -124,7 +124,7 @@ vout_thread_t *__vout_Request( vlc_object_t *p_this, vout_thread_t *p_vout,
{ {
if( !p_fmt ) if( !p_fmt )
{ {
/* Reattach video output to playlist before bailing out */ /* Reattach video output to the instance before bailing out */
if( p_vout ) if( p_vout )
{ {
spu_Attach( p_vout->p_spu, p_this, false ); spu_Attach( p_vout->p_spu, p_this, false );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment