Remove useless vlc_object_detach() before vlc_object_release()
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 28 Jan 2010 20:25:07 +0000 (22:25 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 28 Jan 2010 20:34:23 +0000 (22:34 +0200)
40 files changed:
modules/access/rtmp/access.c
modules/access/screen/screen.c
modules/access_output/rtmp.c
modules/audio_output/directx.c
modules/gui/fbosd.c
modules/gui/minimal_macosx/VLCOpenGLVoutView.m
modules/gui/skins2/src/dialogs.cpp
modules/misc/gnutls.c
modules/misc/testsuite/test4.c
modules/stream_out/mosaic_bridge.c
modules/stream_out/rtp.c
modules/stream_out/transcode/transcode.c
modules/video_filter/atmo/AtmoThread.cpp
modules/video_filter/blendbench.c
modules/video_filter/deinterlace.c
modules/video_filter/opencv_wrapper.c
modules/video_filter/remoteosd.c
modules/video_output/opengl.c
modules/visualization/goom.c
src/audio_output/filters.c
src/audio_output/input.c
src/audio_output/mixer.c
src/input/access.c
src/input/decoder.c
src/input/demux.c
src/input/stream.c
src/input/stream_demux.c
src/input/stream_memory.c
src/input/vlm.c
src/misc/filter.c
src/misc/filter_chain.c
src/misc/image.c
src/misc/xml.c
src/network/httpd.c
src/network/tls.c
src/stream_output/stream_output.c
src/video_output/display.c
src/video_output/vout_subpictures.c
src/video_output/window.c
src/win32/specific.c

index 9d8130b..2c556f6 100644 (file)
@@ -270,7 +270,6 @@ error2:
 error:
     vlc_UrlClean( &p_sys->p_thread->url );
 
-    vlc_object_detach( p_sys->p_thread );
     vlc_object_release( p_sys->p_thread );
 
     free( p_sys );
@@ -315,7 +314,6 @@ static void Close( vlc_object_t * p_this )
     free( p_sys->p_thread->psz_swf_url );
     free( p_sys->p_thread->psz_page_url );
 
-    vlc_object_detach( p_sys->p_thread );
     vlc_object_release( p_sys->p_thread );
     free( p_sys );
 }
index 4ab498e..95c493f 100644 (file)
@@ -356,7 +356,6 @@ void RenderCursor( demux_t *p_demux, int i_x, int i_y,
             if( !p_sys->p_blend->p_module )
             {
                 msg_Err( p_demux, "Could not load video blending module" );
-                vlc_object_detach( p_sys->p_blend );
                 vlc_object_release( p_sys->p_blend );
                 p_sys->p_blend = NULL;
             }
index 7e880ea..ab9d159 100644 (file)
@@ -252,7 +252,6 @@ error2:
         net_Close( p_sys->p_thread->fd );
 error:
     vlc_UrlClean( &p_sys->p_thread->url );
-    vlc_object_detach( p_sys->p_thread );
     vlc_object_release( p_sys->p_thread );
     free( p_sys );
 
@@ -288,7 +287,6 @@ static void Close( vlc_object_t * p_this )
 
     net_Close( p_sys->p_thread->fd );
 
-    vlc_object_detach( p_sys->p_thread );
     vlc_object_release( p_sys->p_thread );
 
     vlc_UrlClean( &p_sys->p_thread->url );
index ce57d5b..f7e6895 100644 (file)
@@ -613,7 +613,6 @@ static void CloseAudio( vlc_object_t *p_this )
     /* kill the position notification thread, if any */
     if( p_sys->p_notif )
     {
-        vlc_object_detach( p_sys->p_notif );
         vlc_object_kill( p_sys->p_notif );
         /* wake up the audio thread if needed */
         if( !p_sys->b_playing ) SetEvent( p_sys->p_notif->event );
index c74a8fe..acebb0b 100644 (file)
@@ -562,7 +562,6 @@ static void CloseBlending( intf_thread_t *p_intf )
             module_unneed( p_intf->p_sys->p_blend,
                            p_intf->p_sys->p_blend->p_module );
 
-        vlc_object_detach( p_intf->p_sys->p_blend );
         vlc_object_release( p_intf->p_sys->p_blend );
     }
 }
@@ -613,7 +612,6 @@ static void CloseTextRenderer( intf_thread_t *p_intf )
             module_unneed( p_intf->p_sys->p_text,
                            p_intf->p_sys->p_text->p_module );
 
-        vlc_object_detach( p_intf->p_sys->p_text );
         vlc_object_release( p_intf->p_sys->p_text );
     }
 }
index fe6fbe3..4fa69c1 100644 (file)
@@ -294,7 +294,6 @@ void cocoaglvoutviewUnlock( vout_thread_t * p_vout )
     [objectLock lock];
     if( p_vout )
     {
-        vlc_object_detach( p_vout );
         vlc_object_release( p_vout );
         vlc_object_release( p_vout );
     }
index e267295..611468a 100644 (file)
@@ -113,8 +113,6 @@ Dialogs::~Dialogs()
     if( m_pProvider && m_pModule )
     {
         // Detach the dialogs provider from its parent interface
-        vlc_object_detach( m_pProvider );
-
         module_unneed( m_pProvider, m_pModule );
         vlc_object_release( m_pProvider );
     }
index 132eb5b..a58583b 100644 (file)
@@ -907,7 +907,6 @@ gnutls_SessionClose (tls_server_t *p_server, tls_session_t *p_session)
         gnutls_bye( p_sys->session, GNUTLS_SHUT_WR );
     gnutls_deinit( p_sys->session );
 
-    vlc_object_detach( p_session );
     vlc_object_release( p_session );
 
     free( p_sys );
@@ -988,7 +987,6 @@ gnutls_ServerSessionPrepare( tls_server_t *p_server )
 
 error:
     free( p_session->p_sys );
-    vlc_object_detach( p_session );
     vlc_object_release( p_session );
     return NULL;
 }
index 84b393f..06a0b0e 100644 (file)
@@ -184,7 +184,6 @@ static int Callback( vlc_object_t *p_this, char const *psz_cmd,
     {
         vlc_object_kill( pp_objects[i] );
         vlc_thread_join( pp_objects[i] );
-        vlc_object_detach( pp_objects[i] );
         vlc_object_release( pp_objects[i] );
     }
 
index 89e6deb..e9ff68b 100644 (file)
@@ -320,7 +320,6 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
     p_sys->p_decoder->p_owner = malloc( sizeof(decoder_owner_sys_t) );
     if( !p_sys->p_decoder->p_owner )
     {
-        vlc_object_detach( p_sys->p_decoder );
         vlc_object_release( p_sys->p_decoder );
         return NULL;
     }
@@ -343,7 +342,6 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
             msg_Err( p_stream, "cannot find decoder" );
         }
         free( p_sys->p_decoder->p_owner );
-        vlc_object_detach( p_sys->p_decoder );
         vlc_object_release( p_sys->p_decoder );
         return NULL;
     }
@@ -451,7 +449,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
         if( p_sys->p_decoder->p_description )
             vlc_meta_Delete( p_sys->p_decoder->p_description );
 
-        vlc_object_detach( p_sys->p_decoder );
         vlc_object_release( p_sys->p_decoder );
 
         free( p_owner );
index fc29d74..ac146cd 100644 (file)
@@ -1419,7 +1419,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
     if( p_sys->b_export_sap && !p_sys->p_mux ) SapSetup( p_stream );
     if( p_sys->psz_sdp_file != NULL ) FileSetup( p_stream );
 
-    vlc_object_detach( id );
     vlc_object_release( id );
     return VLC_SUCCESS;
 }
index 454196e..e2ace26 100644 (file)
@@ -609,14 +609,12 @@ error:
     {
         if( id->p_decoder )
         {
-            vlc_object_detach( id->p_decoder );
             vlc_object_release( id->p_decoder );
             id->p_decoder = NULL;
         }
 
         if( id->p_encoder )
         {
-            vlc_object_detach( id->p_encoder );
             es_format_Clean( &id->p_encoder->fmt_out );
             vlc_object_release( id->p_encoder );
             id->p_encoder = NULL;
@@ -654,14 +652,12 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
 
     if( id->p_decoder )
     {
-        vlc_object_detach( id->p_decoder );
         vlc_object_release( id->p_decoder );
         id->p_decoder = NULL;
     }
 
     if( id->p_encoder )
     {
-        vlc_object_detach( id->p_encoder );
         es_format_Clean( &id->p_encoder->fmt_out );
         vlc_object_release( id->p_encoder );
         id->p_encoder = NULL;
index 25209ab..5aea767 100644 (file)
@@ -50,7 +50,6 @@ CThread::~CThread(void)
   {
       vlc_mutex_destroy( &m_TerminateLock );
       vlc_cond_destroy( &m_TerminateCond );
-      vlc_object_detach(m_pAtmoThread);
       vlc_object_release(m_pAtmoThread);
   }
 }
index 5751326..e432ea2 100644 (file)
@@ -231,7 +231,6 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
     if( !p_blend->p_module )
     {
         picture_Release( p_pic );
-        vlc_object_detach( p_blend );
         vlc_object_release( p_blend );
         return NULL;
     }
@@ -255,7 +254,6 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
 
     module_unneed( p_blend, p_blend->p_module );
 
-    vlc_object_detach( p_blend );
     vlc_object_release( p_blend );
 
     p_sys->b_done = true;
index 24678f4..60254ef 100644 (file)
@@ -2061,7 +2061,6 @@ static int OpenFilter( vlc_object_t *p_this )
 
     if( Create( VLC_OBJECT(p_vout) ) != VLC_SUCCESS )
     {
-        vlc_object_detach( p_vout );
         vlc_object_release( p_vout );
         return VLC_EGENERIC;
     }
@@ -2093,7 +2092,6 @@ static void CloseFilter( vlc_object_t *p_this )
     vout_thread_t *p_vout = (vout_thread_t *)p_filter->p_sys;
 
     Destroy( VLC_OBJECT(p_vout) );
-    vlc_object_detach( p_vout );
     vlc_object_release( p_vout );
 }
 
index a869607..7b71058 100644 (file)
@@ -339,7 +339,6 @@ static int Init( vout_thread_t *p_vout )
     {
         msg_Err( p_vout, "can't open internal opencv filter: %s", p_vout->p_sys->psz_inner_name );
         p_vout->p_sys->psz_inner_name = NULL;
-        vlc_object_detach( p_sys->p_opencv );
         vlc_object_release( p_sys->p_opencv );
         p_sys->p_opencv = NULL;
     }
@@ -381,7 +380,6 @@ static void End( vout_thread_t *p_vout )
         //release the internal opencv filter
         if( p_sys->p_opencv->p_module )
             module_unneed( p_sys->p_opencv, p_sys->p_opencv->p_module );
-        vlc_object_detach( p_sys->p_opencv );
         vlc_object_release( p_sys->p_opencv );
         p_sys->p_opencv = NULL;
     }
index a1721aa..69bb931 100644 (file)
@@ -332,7 +332,6 @@ static int CreateFilter ( vlc_object_t *p_this )
     if( vlc_thread_create( p_sys->p_worker_thread, "vnc worker thread",
                            vnc_worker_thread, VLC_THREAD_PRIORITY_LOW ) )
     {
-        vlc_object_detach( p_sys->p_worker_thread );
         vlc_object_release( p_sys->p_worker_thread );
         msg_Err( p_filter, "cannot spawn vnc message reader thread" );
         goto error;
@@ -407,7 +406,6 @@ static void stop_osdvnc ( filter_t *p_filter )
         msg_Dbg( p_filter, "joining worker_thread" );
         vlc_object_kill( p_sys->p_worker_thread );
         vlc_thread_join( p_sys->p_worker_thread );
-        vlc_object_detach( p_sys->p_worker_thread );
         vlc_object_release( p_sys->p_worker_thread );
         msg_Dbg( p_filter, "released worker_thread" );
     }
@@ -713,7 +711,6 @@ static void* vnc_worker_thread( vlc_object_t *p_thread_obj )
                            "vnc update request thread",
                            update_request_thread, VLC_THREAD_PRIORITY_LOW ) )
     {
-        vlc_object_detach( p_update_request_thread );
         vlc_object_release( p_update_request_thread );
         msg_Err( p_filter, "cannot spawn vnc update request thread" );
         goto exit;
@@ -774,7 +771,6 @@ static void* vnc_worker_thread( vlc_object_t *p_thread_obj )
     msg_Dbg( p_filter, "joining update_request_thread" );
     vlc_object_kill( p_update_request_thread );
     vlc_thread_join( p_update_request_thread );
-    vlc_object_detach( p_update_request_thread );
     vlc_object_release( p_update_request_thread );
     msg_Dbg( p_filter, "released update_request_thread" );
 
index 90e4416..c1dfb44 100644 (file)
@@ -157,7 +157,6 @@ static int CreateVout( vlc_object_t *p_this )
     if( p_sys->p_vout->p_module == NULL )
     {
         msg_Warn( p_vout, "No OpenGL provider found" );
-        vlc_object_detach( p_sys->p_vout );
         /* no need for var_DelCallback here :-) */
         vlc_object_release( p_sys->p_vout );
         free( p_sys );
index 4efc11b..8384b51 100644 (file)
@@ -172,7 +172,6 @@ static int Open( vlc_object_t *p_this )
     if( p_thread->p_vout == NULL )
     {
         msg_Err( p_filter, "no suitable vout module" );
-        vlc_object_detach( p_thread );
         vlc_object_release( p_thread );
         free( p_sys );
         return VLC_EGENERIC;
@@ -195,7 +194,6 @@ static int Open( vlc_object_t *p_this )
         vlc_mutex_destroy( &p_thread->lock );
         vlc_cond_destroy( &p_thread->wait );
         free( p_thread->psz_title );
-        vlc_object_detach( p_thread );
         vlc_object_release( p_thread );
         free( p_sys );
         return VLC_EGENERIC;
@@ -395,7 +393,6 @@ static void Close( vlc_object_t *p_this )
     aout_filter_RequestVout( p_filter, p_sys->p_thread->p_vout, 0 );
     vlc_mutex_destroy( &p_sys->p_thread->lock );
     vlc_cond_destroy( &p_sys->p_thread->wait );
-    vlc_object_detach( p_sys->p_thread );
 
     while( p_sys->p_thread->i_blocks-- )
     {
index 19727ff..8a7bca5 100644 (file)
@@ -71,7 +71,6 @@ static filter_t * FindFilter( aout_instance_t * p_aout,
     p_filter->p_module = module_need( p_filter, "audio filter", NULL, false );
     if ( p_filter->p_module == NULL )
     {
-        vlc_object_detach( p_filter );
         vlc_object_release( p_filter );
         return NULL;
     }
@@ -134,7 +133,6 @@ static int SplitConversion( const audio_sample_format_t * p_input_format,
 static void ReleaseFilter( filter_t * p_filter )
 {
     module_unneed( p_filter, p_filter->p_module );
-    vlc_object_detach( p_filter );
     vlc_object_release( p_filter );
 }
 
@@ -288,7 +286,6 @@ void aout_FiltersDestroyPipeline( aout_instance_t * p_aout,
 
         module_unneed( p_filter, p_filter->p_module );
         free( p_filter->p_owner );
-        vlc_object_detach( p_filter );
         vlc_object_release( p_filter );
     }
 }
index 8e40756..2ff470b 100644 (file)
@@ -343,7 +343,6 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input, const aout_
                          psz_parser );
 
                 free( p_filter->p_owner );
-                vlc_object_detach( p_filter );
                 vlc_object_release( p_filter );
 
                 psz_parser = psz_next;
@@ -364,7 +363,6 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input, const aout_
 
                     module_unneed( p_filter, p_filter->p_module );
                     free( p_filter->p_owner );
-                    vlc_object_detach( p_filter );
                     vlc_object_release( p_filter );
 
                     psz_parser = psz_next;
index b4b2c26..108e815 100644 (file)
@@ -65,7 +65,6 @@ int aout_MixerNew( aout_instance_t * p_aout )
     if( !p_mixer->module )
     {
         msg_Err( p_aout, "no suitable audio mixer" );
-        vlc_object_detach( p_mixer );
         free( p_mixer->input );
         vlc_object_release( p_mixer );
         return VLC_EGENERIC;
@@ -86,8 +85,6 @@ void aout_MixerDelete( aout_instance_t * p_aout )
     if( !p_aout->p_mixer )
         return;
 
-    vlc_object_detach( p_aout->p_mixer );
-
     module_unneed( p_aout->p_mixer, p_aout->p_mixer->module );
 
     free( p_aout->p_mixer->input );
index 98e30d4..9604751 100644 (file)
@@ -66,7 +66,6 @@ access_t *__access_New( vlc_object_t *p_obj, input_thread_t *p_parent_input,
 
     if( p_access->p_module == NULL )
     {
-        vlc_object_detach( p_access );
         free( p_access->psz_access );
         free( p_access->psz_path );
         free( p_access->psz_demux );
@@ -83,7 +82,6 @@ access_t *__access_New( vlc_object_t *p_obj, input_thread_t *p_parent_input,
 void access_Delete( access_t *p_access )
 {
     module_unneed( p_access, p_access->p_module );
-    vlc_object_detach( p_access );
 
     free( p_access->psz_access );
     free( p_access->psz_path );
index eb304b2..8ed5a13 100644 (file)
@@ -784,7 +784,6 @@ static decoder_t * CreateDecoder( input_thread_t *p_input,
             if( !p_dec->p_owner->p_packetizer->p_module )
             {
                 es_format_Clean( &p_dec->p_owner->p_packetizer->fmt_in );
-                vlc_object_detach( p_dec->p_owner->p_packetizer );
                 vlc_object_release( p_dec->p_owner->p_packetizer );
             }
         }
@@ -2096,7 +2095,6 @@ static void DeleteDecoder( decoder_t * p_dec )
         es_format_Clean( &p_owner->p_packetizer->fmt_out );
         if( p_owner->p_packetizer->p_description )
             vlc_meta_Delete( p_owner->p_packetizer->p_description );
-        vlc_object_detach( p_owner->p_packetizer );
         vlc_object_release( p_owner->p_packetizer );
     }
 
@@ -2104,7 +2102,6 @@ static void DeleteDecoder( decoder_t * p_dec )
     vlc_cond_destroy( &p_owner->wait_request );
     vlc_mutex_destroy( &p_owner->lock );
 
-    vlc_object_detach( p_dec );
     vlc_object_release( p_dec );
 
     free( p_owner );
index d33d356..41441f9 100644 (file)
@@ -178,7 +178,6 @@ demux_t *__demux_New( vlc_object_t *p_obj, input_thread_t *p_parent_input,
 
     if( p_demux->p_module == NULL )
     {
-        vlc_object_detach( p_demux );
         free( p_demux->psz_path );
         free( p_demux->psz_demux );
         free( p_demux->psz_access );
@@ -195,7 +194,6 @@ demux_t *__demux_New( vlc_object_t *p_obj, input_thread_t *p_parent_input,
 void demux_Delete( demux_t *p_demux )
 {
     module_unneed( p_demux, p_demux->p_module );
-    vlc_object_detach( p_demux );
 
     free( p_demux->psz_path );
     free( p_demux->psz_demux );
index 7714114..85ac913 100644 (file)
@@ -461,7 +461,6 @@ error:
         free( p_sys->list[--(p_sys->i_list)] );
     free( p_sys->list );
     free( s->p_sys );
-    vlc_object_detach( s );
     stream_CommonDelete( s );
     return NULL;
 }
@@ -473,8 +472,6 @@ static void AStreamDestroy( stream_t *s )
 {
     stream_sys_t *p_sys = s->p_sys;
 
-    vlc_object_detach( s );
-
     if( p_sys->method == STREAM_METHOD_BLOCK )
         block_ChainRelease( p_sys->block.p_first );
     else
index e815371..fe96fdf 100644 (file)
@@ -99,7 +99,6 @@ stream_t *stream_DemuxNew( demux_t *p_demux, const char *psz_demux, es_out_t *ou
     if( vlc_thread_create( s, "stream out", DStreamThread,
                            VLC_THREAD_PRIORITY_INPUT ) )
     {
-        vlc_object_detach( s );
         stream_CommonDelete( s );
         free( p_sys->psz_name );
         free( p_sys );
@@ -136,7 +135,6 @@ static void DStreamDelete( stream_t *s )
     block_FifoRelease( p_sys->p_fifo );
     free( p_sys->psz_name );
     free( p_sys );
-    vlc_object_detach( s );
     stream_CommonDelete( s );
 }
 
index 5dac4f2..1f40912 100644 (file)
@@ -91,7 +91,6 @@ static void Delete( stream_t *s )
 {
     if( !s->p_sys->i_preserve_memory ) free( s->p_sys->p_buffer );
     free( s->p_sys );
-    vlc_object_detach( s );
     stream_CommonDelete( s );
 }
 
index 331f20d..dee9c53 100644 (file)
@@ -666,7 +666,6 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
         if( !p_vlm->p_vod->p_module )
         {
             msg_Err( p_vlm, "cannot find vod server" );
-            vlc_object_detach( p_vlm->p_vod );
             vlc_object_release( p_vlm->p_vod );
             p_vlm->p_vod = NULL;
             return VLC_EGENERIC;
@@ -737,7 +736,6 @@ static int vlm_ControlMediaDel( vlm_t *p_vlm, int64_t id )
     if( p_vlm->p_vod && p_vlm->i_vod <= 0 )
     {
         module_unneed( p_vlm->p_vod, p_vlm->p_vod->p_module );
-        vlc_object_detach( p_vlm->p_vod );
         vlc_object_release( p_vlm->p_vod );
         p_vlm->p_vod = NULL;
     }
index 7359982..d769b60 100644 (file)
@@ -111,7 +111,6 @@ void filter_DeleteBlend( filter_t *p_blend )
     if( p_blend->p_module )
         module_unneed( p_blend, p_blend->p_module );
 
-    vlc_object_detach( p_blend );
     vlc_object_release( p_blend );
 }
 
@@ -149,7 +148,6 @@ void video_splitter_Delete( video_splitter_t *p_splitter )
 
     video_format_Clean( &p_splitter->fmt );
 
-    vlc_object_detach( p_splitter );
     vlc_object_release( p_splitter );
 }
 
index 24f54e1..823d24d 100644 (file)
@@ -366,7 +366,6 @@ error:
         module_unneed( p_filter, p_filter->p_module );
     es_format_Clean( &p_filter->fmt_in );
     es_format_Clean( &p_filter->fmt_out );
-    vlc_object_detach( p_filter );
     vlc_object_release( p_filter );
     return NULL;
 }
@@ -438,7 +437,6 @@ static int filter_chain_DeleteFilterInternal( filter_chain_t *p_chain,
     else
         AllocatorClean( &p_chain->allocator, p_chained );
 
-    vlc_object_detach( p_filter );
     if( p_filter->p_module )
         module_unneed( p_filter, p_filter->p_module );
     free( p_chained->mouse );
index c917f58..3f7758d 100644 (file)
@@ -683,8 +683,6 @@ static decoder_t *CreateDecoder( vlc_object_t *p_this, video_format_t *fmt )
 
 static void DeleteDecoder( decoder_t * p_dec )
 {
-    vlc_object_detach( p_dec );
-
     if( p_dec->p_module ) module_unneed( p_dec, p_dec->p_module );
 
     es_format_Clean( &p_dec->fmt_in );
@@ -766,8 +764,6 @@ static encoder_t *CreateEncoder( vlc_object_t *p_this, video_format_t *fmt_in,
 
 static void DeleteEncoder( encoder_t * p_enc )
 {
-    vlc_object_detach( p_enc );
-
     if( p_enc->p_module ) module_unneed( p_enc, p_enc->p_module );
 
     es_format_Clean( &p_enc->fmt_in );
@@ -812,8 +808,6 @@ static filter_t *CreateFilter( vlc_object_t *p_this, es_format_t *p_fmt_in,
 
 static void DeleteFilter( filter_t * p_filter )
 {
-    vlc_object_detach( p_filter );
-
     if( p_filter->p_module ) module_unneed( p_filter, p_filter->p_module );
 
     es_format_Clean( &p_filter->fmt_in );
index e5c73ab..25515b5 100644 (file)
@@ -46,7 +46,6 @@ xml_t *__xml_Create( vlc_object_t *p_this )
     p_xml->p_module = module_need( p_xml, "xml", NULL, false );
     if( !p_xml->p_module )
     {
-        vlc_object_detach( p_xml );
         vlc_object_release( p_xml );
         msg_Err( p_this, "XML provider not found" );
         return NULL;
@@ -61,6 +60,5 @@ xml_t *__xml_Create( vlc_object_t *p_this )
 void xml_Delete( xml_t *p_xml )
 {
     module_unneed( p_xml, p_xml->p_module );
-    vlc_object_detach( p_xml );
     vlc_object_release( p_xml );
 }
index cad49ed..39835a2 100644 (file)
@@ -1122,7 +1122,6 @@ error:
     if( httpd->i_host <= 0 )
     {
         libvlc_priv (httpd->p_libvlc)->p_httpd = NULL;
-        vlc_object_detach( httpd );
         vlc_object_release( httpd );
     }
     vlc_mutex_unlock( &httpd_mutex );
@@ -1202,7 +1201,6 @@ void httpd_HostDelete( httpd_host_t *host )
         msg_Dbg( httpd, "no hosts left, stopping httpd" );
 
         libvlc_priv (httpd->p_libvlc)->p_httpd = NULL;
-        vlc_object_detach( httpd );
         vlc_object_release( httpd );
     }
     vlc_mutex_unlock( &httpd_mutex );
index b3ca2fe..94f09f7 100644 (file)
@@ -93,7 +93,6 @@ void tls_ServerDelete (tls_server_t *srv)
         return;
 
     module_unneed (srv, srv->p_module);
-    vlc_object_detach (srv);
     vlc_object_release (srv);
 }
 
@@ -223,6 +222,5 @@ void tls_ClientDelete (tls_session_t *cl)
         return;
 
     module_unneed (cl, cl->p_module);
-    vlc_object_detach (cl);
     vlc_object_release (cl);
 }
index ab1918d..cabc9cd 100644 (file)
@@ -129,7 +129,6 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, const char *psz_des
 
     FREENULL( p_sout->psz_sout );
 
-    vlc_object_detach( p_sout );
     vlc_object_release( p_sout );
     return NULL;
 }
@@ -327,7 +326,6 @@ sout_access_out_t *sout_AccessOutNew( vlc_object_t *p_sout,
     {
         free( p_access->psz_access );
         free( p_access->psz_path );
-        vlc_object_detach( p_access );
         vlc_object_release( p_access );
         return( NULL );
     }
@@ -339,7 +337,6 @@ sout_access_out_t *sout_AccessOutNew( vlc_object_t *p_sout,
  *****************************************************************************/
 void sout_AccessOutDelete( sout_access_out_t *p_access )
 {
-    vlc_object_detach( p_access );
     if( p_access->p_module )
     {
         module_unneed( p_access, p_access->p_module );
@@ -449,7 +446,6 @@ sout_mux_t * sout_MuxNew( sout_instance_t *p_sout, const char *psz_mux,
     {
         FREENULL( p_mux->psz_mux );
 
-        vlc_object_detach( p_mux );
         vlc_object_release( p_mux );
         return NULL;
     }
@@ -500,7 +496,6 @@ sout_mux_t * sout_MuxNew( sout_instance_t *p_sout, const char *psz_mux,
  *****************************************************************************/
 void sout_MuxDelete( sout_mux_t *p_mux )
 {
-    vlc_object_detach( p_mux );
     if( p_mux->p_module )
     {
         module_unneed( p_mux, p_mux->p_module );
@@ -798,7 +793,6 @@ static void sout_StreamDelete( sout_stream_t *p_stream )
 {
     msg_Dbg( p_stream, "destroying chain... (name=%s)", p_stream->psz_name );
 
-    vlc_object_detach( p_stream );
     if( p_stream->p_module ) module_unneed( p_stream, p_stream->p_module );
 
     FREENULL( p_stream->psz_name );
index 9a865f1..5639dea 100644 (file)
@@ -128,7 +128,6 @@ static vout_display_t *vout_display_New(vlc_object_t *obj,
     if (load_module) {
         vd->module = module_need(vd, "vout display", module, module && *module != '\0');
         if (!vd->module) {
-            vlc_object_detach(vd);
             vlc_object_release(vd);
             return NULL;
         }
@@ -143,8 +142,6 @@ static vout_display_t *vout_display_New(vlc_object_t *obj,
  */
 static void vout_display_Delete(vout_display_t *vd)
 {
-    vlc_object_detach(vd);
-
     if (vd->module)
         module_unneed(vd, vd->module);
 
index a9c4a0a..9fecf2c 100644 (file)
@@ -956,7 +956,6 @@ static void FilterRelease( filter_t *p_filter )
     if( p_filter->p_module )
         module_unneed( p_filter, p_filter->p_module );
 
-    vlc_object_detach( p_filter );
     vlc_object_release( p_filter );
 }
 
index 2b66181..7a6338d 100644 (file)
@@ -74,7 +74,6 @@ vout_window_t *vout_window_New(vlc_object_t *obj,
 
     w->module = module_need(window, type, module, module && *module != '\0');
     if (!w->module) {
-        vlc_object_detach(window);
         vlc_object_release(window);
         return NULL;
     }
@@ -100,7 +99,6 @@ void vout_window_Delete(vout_window_t *window)
     window_t *w = (window_t *)window;
     if (w->inhibit)
         vlc_inhibit_Destroy (w->inhibit);
-    vlc_object_detach(window);
 
     module_unneed(window, w->module);
 
index 9300140..85fcc03 100644 (file)
@@ -397,7 +397,6 @@ void system_End( libvlc_int_t *p_this )
         }
 
         /* FIXME: thread-safety... */
-        vlc_object_detach (p_helper);
         vlc_object_release (p_helper);
         p_helper = NULL;
     }