objects: introduce vlc_object_delete()
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 6 Mar 2019 18:15:18 +0000 (20:15 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 6 Mar 2019 20:53:24 +0000 (22:53 +0200)
Objects have one strong reference held by their "owner", and zero or
more weak references generated by vlc_object_hold() et al. This
provides a separate function to remove the strong reference than
vlc_object_release() to remove weak ones.

With this sole change, this is really only an annotation though.

70 files changed:
include/vlc_objects.h
lib/media_player.c
modules/access/screen/screen.c
modules/audio_filter/gain.c
modules/audio_filter/scaletempo.c
modules/audio_output/mmdevice.c
modules/audio_output/winstore.c
modules/codec/avcodec/va.c
modules/gui/macosx/windows/extensions/VLCExtensionsManager.m
modules/gui/qt/extensions_manager.cpp
modules/gui/skins2/src/dialogs.cpp
modules/hw/d3d11/d3d11_surface.c
modules/hw/d3d9/dxa9.c
modules/misc/addons/fsstorage.c
modules/stream_out/transcode/encoder/audio.c
modules/stream_out/transcode/encoder/encoder.c
modules/stream_out/transcode/encoder/video.c
modules/video_filter/blendbench.c
modules/video_filter/ci_filters.m
modules/video_filter/opencv_wrapper.c
modules/video_output/caopengllayer.m
modules/video_output/ios.m
modules/video_output/macosx.m
modules/video_output/opengl/vout_helper.c
modules/video_output/splitter.c
modules/video_output/vulkan/instance.c
modules/video_output/win32/glwin32.c
src/audio_output/filters.c
src/audio_output/output.c
src/audio_output/volume.c
src/input/access.c
src/input/decoder.c
src/input/decoder_helpers.c
src/input/demux.c
src/input/input.c
src/input/item.c
src/input/meta.c
src/input/player.c
src/input/services_discovery.c
src/input/stream.c
src/input/stream_extractor.c
src/input/vlm.c
src/interface/interface.c
src/libvlc.c
src/media_source/media_source.c
src/misc/addons.c
src/misc/filter.c
src/misc/filter_chain.c
src/misc/fingerprinter.c
src/misc/image.c
src/misc/keystore.c
src/misc/medialibrary.c
src/misc/messages.c
src/misc/probe.c
src/misc/renderer_discovery.c
src/misc/update.c
src/misc/xml.c
src/network/httpd.c
src/network/tls.c
src/playlist_legacy/engine.c
src/playlist_legacy/loadsave.c
src/preparser/fetcher.c
src/stream_output/stream_output.c
src/video_output/display.c
src/video_output/inhibit.c
src/video_output/opengl.c
src/video_output/video_output.c
src/video_output/vout_subpictures.c
src/video_output/window.c
test/src/input/decoder.c

index aef56e8..11692b2 100644 (file)
@@ -101,13 +101,26 @@ VLC_API vlc_object_t *vlc_object_find_name( vlc_object_t *, const char * ) VLC_U
 VLC_API void * vlc_object_hold(vlc_object_t *obj);
 
 /**
- * Drops a reference to an object.
+ * Removes a weak reference to an object.
  *
  * This atomically decrements the reference count.
  * If the count reaches zero, the object is destroyed.
  */
 VLC_API void vlc_object_release(vlc_object_t *obj);
 
+/**
+ * Drops the strong reference to an object.
+ *
+ * This removes the initial strong reference to a given object. This must be
+ * called exactly once per allocated object after it is no longer needed,
+ * matching vlc_object_create() or vlc_custom_create().
+ */
+static inline void vlc_object_delete(vlc_object_t *obj)
+{
+    vlc_object_release(obj);
+}
+#define vlc_object_delete(obj) vlc_object_delete(VLC_OBJECT(obj))
+
 VLC_API size_t vlc_list_children(vlc_object_t *, vlc_object_t **, size_t) VLC_USED;
 
 /**
index 87e7f4f..106e7d2 100644 (file)
@@ -751,7 +751,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
     mp->input.p_resource = input_resource_New(VLC_OBJECT(mp));
     if (unlikely(mp->input.p_resource == NULL))
     {
-        vlc_object_release(mp);
+        vlc_object_delete(mp);
         return NULL;
     }
     audio_output_t *aout = input_resource_GetAout(mp->input.p_resource);
@@ -846,7 +846,7 @@ static void libvlc_media_player_destroy( libvlc_media_player_t *p_mi )
     }
 
     libvlc_instance_t *instance = p_mi->p_libvlc_instance;
-    vlc_object_release( p_mi );
+    vlc_object_delete(p_mi);
     libvlc_release(instance);
 }
 
index 0b06590..0c472de 100644 (file)
@@ -264,7 +264,7 @@ static void Close( vlc_object_t *p_this )
     if( p_sys->p_blend )
     {
         module_unneed( p_sys->p_blend, p_sys->p_blend->p_module );
-        vlc_object_release( p_sys->p_blend );
+        vlc_object_delete(p_sys->p_blend);
     }
 #endif
     free( p_sys );
@@ -382,7 +382,7 @@ 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_release( p_sys->p_blend );
+                vlc_object_delete(p_sys->p_blend);
                 p_sys->p_blend = NULL;
             }
         }
index 5a95953..655d944 100644 (file)
@@ -89,7 +89,7 @@ static int Open( vlc_object_t *p_this )
     if( p_sys->module == NULL )
     {
         msg_Warn( p_filter, "unsupported format" );
-        vlc_object_release( &p_sys->volume );
+        vlc_object_delete(&p_sys->volume);
         return VLC_EGENERIC;
     }
 
@@ -126,5 +126,5 @@ static void Close( vlc_object_t *p_this )
     filter_sys_t *p_sys = p_filter->p_sys;
 
     module_unneed( &p_sys->volume, p_sys->module );
-    vlc_object_release( &p_sys->volume );
+    vlc_object_delete(&p_sys->volume);
 }
index fc4f570..e30e12c 100644 (file)
@@ -488,7 +488,7 @@ static filter_t *ResamplerCreate(filter_t *p_filter)
     if( p_resampler->p_module == NULL )
     {
         msg_Err( p_filter, "Could not load resampler" );
-        vlc_object_release( p_resampler );
+        vlc_object_delete(p_resampler);
         return NULL;
     }
     return p_resampler;
@@ -539,7 +539,7 @@ static void ClosePitch( vlc_object_t *p_this )
     var_DelCallback( p_aout, "pitch-shift", PitchCallback, p_sys );
     var_Destroy( p_aout, "pitch-shift" );
     module_unneed( p_sys->resampler, p_sys->resampler->p_module );
-    vlc_object_release( p_sys->resampler );
+    vlc_object_delete(p_sys->resampler);
     Close( p_this );
 }
 #endif
index 2945615..162c835 100644 (file)
@@ -1157,7 +1157,7 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
          * failed. */
         LeaveCriticalSection(&sys->lock);
         LeaveMTA();
-        vlc_object_release(s);
+        vlc_object_delete(s);
         return -1;
     }
 
@@ -1225,7 +1225,7 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
 
     if (sys->module == NULL)
     {
-        vlc_object_release(s);
+        vlc_object_delete(s);
         return -1;
     }
 
@@ -1245,7 +1245,7 @@ static void Stop(audio_output_t *aout)
     vlc_module_unload(sys->module, aout_stream_Stop, sys->stream);
     LeaveMTA();
 
-    vlc_object_release(sys->stream);
+    vlc_object_delete(sys->stream);
     sys->stream = NULL;
 }
 
index 8420c3a..5205c9e 100644 (file)
@@ -246,7 +246,7 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
 
     if (sys->module == NULL)
     {
-        vlc_object_release(s);
+        vlc_object_delete(s);
         return -1;
     }
 
@@ -265,7 +265,7 @@ static void Stop(audio_output_t *aout)
     vlc_module_unload(sys->module, aout_stream_Stop, sys->stream);
     LeaveMTA();
 
-    vlc_object_release(sys->stream);
+    vlc_object_delete(sys->stream);
     sys->stream = NULL;
 }
 
index d0b0b88..fe9884c 100644 (file)
@@ -132,7 +132,7 @@ vlc_va_t *vlc_va_New(vlc_object_t *obj, AVCodecContext *avctx,
     free(modlist);
     if (priv->module == NULL)
     {
-        vlc_object_release(va);
+        vlc_object_delete(va);
         va = NULL;
     }
     return va;
@@ -143,5 +143,5 @@ void vlc_va_Delete(vlc_va_t *va, void **hwctx)
     struct vlc_va_priv *priv = container_of(va, struct vlc_va_priv, va);
 
     vlc_module_unload(priv->module, vlc_va_Stop, va, hwctx);
-    vlc_object_release(va);
+    vlc_object_delete(va);
 }
index 52c7fdb..5751c72 100644 (file)
 
         if (!p_extensions_manager->p_module) {
             msg_Err(p_intf, "Unable to load extensions module");
-            vlc_object_release(p_extensions_manager);
+            vlc_object_delete(p_extensions_manager);
             p_extensions_manager = NULL;
             b_failed = true;
             return false;
     _isUnloading = true;
 
     module_unneed(p_extensions_manager, p_extensions_manager->p_module);
-    vlc_object_release(p_extensions_manager);
+    vlc_object_delete(p_extensions_manager);
     p_extensions_manager = NULL;
 }
 
 
     _extensionDialogProvider = nil;
     if (p_extensions_manager)
-        vlc_object_release(p_extensions_manager);
+        vlc_object_delete(p_extensions_manager);
 }
 
 - (BOOL)isLoaded
index 5bcc8d5..52ad5eb 100644 (file)
@@ -63,7 +63,7 @@ ExtensionsManager::~ExtensionsManager()
     if( p_extensions_manager )
     {
         module_unneed( p_extensions_manager, p_extensions_manager->p_module );
-        vlc_object_release( p_extensions_manager );
+        vlc_object_delete(p_extensions_manager);
     }
 }
 
@@ -86,7 +86,7 @@ bool ExtensionsManager::loadExtensions()
         if( !p_extensions_manager->p_module )
         {
             msg_Err( p_intf, "Unable to load extensions module" );
-            vlc_object_release( p_extensions_manager );
+            vlc_object_delete(p_extensions_manager);
             p_extensions_manager = NULL;
             b_failed = true;
             emit extensionsUpdated();
@@ -101,7 +101,7 @@ bool ExtensionsManager::loadExtensions()
             msg_Err( p_intf, "Unable to create dialogs provider for extensions" );
             module_unneed( p_extensions_manager,
                            p_extensions_manager->p_module );
-            vlc_object_release( p_extensions_manager );
+            vlc_object_delete(p_extensions_manager);
             p_extensions_manager = NULL;
             b_failed = true;
             emit extensionsUpdated();
@@ -121,7 +121,7 @@ void ExtensionsManager::unloadExtensions()
     b_unloading = true;
     ExtensionsDialogProvider::killInstance();
     module_unneed( p_extensions_manager, p_extensions_manager->p_module );
-    vlc_object_release( p_extensions_manager );
+    vlc_object_delete(p_extensions_manager);
     p_extensions_manager = NULL;
 }
 
index 8ca54ad..fdb1799 100644 (file)
@@ -123,7 +123,7 @@ Dialogs::~Dialogs()
     {
         // Detach the dialogs provider from its parent interface
         module_unneed( m_pProvider, m_pModule );
-        vlc_object_release( m_pProvider );
+        vlc_object_delete(m_pProvider);
 
         /* Unregister callbacks */
         var_DelCallback( pl_Get(getIntf()), "intf-popupmenu",
@@ -170,7 +170,7 @@ bool Dialogs::init()
     m_pModule = module_need( m_pProvider, "dialogs provider", NULL, false );
     if( m_pModule == NULL )
     {
-        vlc_object_release( m_pProvider );
+        vlc_object_delete(m_pProvider);
         m_pProvider = NULL;
         return false;
     }
index 9393cdb..5b16bbf 100644 (file)
@@ -509,7 +509,7 @@ static void DeleteFilter( filter_t * p_filter )
     es_format_Clean( &p_filter->fmt_in );
     es_format_Clean( &p_filter->fmt_out );
 
-    vlc_object_release( p_filter );
+    vlc_object_delete(p_filter);
 }
 
 static picture_t *NewBuffer(filter_t *p_filter)
index f387638..035d96a 100644 (file)
@@ -184,7 +184,7 @@ static void DeleteFilter( filter_t * p_filter )
     es_format_Clean( &p_filter->fmt_in );
     es_format_Clean( &p_filter->fmt_out );
 
-    vlc_object_release( p_filter );
+    vlc_object_delete(p_filter);
 }
 
 static picture_t *NewBuffer(filter_t *p_filter)
index 6d26429..b76bff7 100644 (file)
@@ -525,7 +525,7 @@ static int Install( addons_storage_t *p_storage, addon_entry_t *p_entry )
         module_unneed( p_finder, p_module );
     }
 
-    vlc_object_release( p_finder );
+    vlc_object_delete(p_finder);
 
     return i_ret;
 }
index 6571663..d45f7a0 100644 (file)
@@ -164,7 +164,7 @@ int transcode_encoder_audio_test( vlc_object_t *p_obj,
     {
         es_format_Clean( &p_encoder->fmt_in );
         es_format_Clean( &p_encoder->fmt_out );
-        vlc_object_release( p_encoder );
+        vlc_object_delete(p_encoder);
         return VLC_EGENERIC;
     }
 
@@ -199,7 +199,7 @@ int transcode_encoder_audio_test( vlc_object_t *p_obj,
     es_format_Clean( &p_encoder->fmt_in );
     es_format_Clean( &p_encoder->fmt_out );
 
-    vlc_object_release( p_encoder );
+    vlc_object_delete(p_encoder);
 
     return p_module != NULL ? VLC_SUCCESS : VLC_EGENERIC;
 }
index ac50cb0..2cc0bf6 100644 (file)
@@ -54,7 +54,7 @@ void transcode_encoder_delete( transcode_encoder_t *p_enc )
         }
         es_format_Clean( &p_enc->p_encoder->fmt_in );
         es_format_Clean( &p_enc->p_encoder->fmt_out );
-        vlc_object_release( p_enc->p_encoder );
+        vlc_object_delete(p_enc->p_encoder);
     }
     free( p_enc );
 }
@@ -101,7 +101,7 @@ transcode_encoder_t * transcode_encoder_new( vlc_object_t *p_obj,
             {
                 es_format_Clean( &p_enc->p_encoder->fmt_in );
                 es_format_Clean( &p_enc->p_encoder->fmt_out );
-                vlc_object_release( p_enc->p_encoder );
+                vlc_object_delete(p_enc->p_encoder);
                 free( p_enc );
                 return NULL;
             }
index ece2d3b..062f898 100644 (file)
@@ -320,7 +320,7 @@ int transcode_encoder_video_test( vlc_object_t *p_obj,
     es_format_Clean( &p_encoder->fmt_in );
     es_format_Clean( &p_encoder->fmt_out );
 
-    vlc_object_release( p_encoder );
+    vlc_object_delete(p_encoder);
 
     return p_module != NULL ? VLC_SUCCESS : VLC_EGENERIC;
 }
index 02c45ef..f288638 100644 (file)
@@ -245,7 +245,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
     if( !p_blend->p_module )
     {
         picture_Release( p_pic );
-        vlc_object_release( p_blend );
+        vlc_object_delete(p_blend);
         return NULL;
     }
 
@@ -268,7 +268,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
 
     module_unneed( p_blend, p_blend->p_module );
 
-    vlc_object_release( p_blend );
+    vlc_object_delete(p_blend);
 
     p_sys->b_done = true;
     return p_pic;
index 5eb4e04..700ddba 100644 (file)
@@ -531,12 +531,12 @@ Close_RemoveConverters(filter_t *filter, struct ci_filters_ctx *ctx)
     if (ctx->src_converter)
     {
         module_unneed(ctx->src_converter, ctx->src_converter->p_module);
-        vlc_object_release(ctx->src_converter);
+        vlc_object_delete(ctx->src_converter);
     }
     if (ctx->dst_converter)
     {
         module_unneed(ctx->dst_converter, ctx->dst_converter->p_module);
-        vlc_object_release(ctx->dst_converter);
+        vlc_object_delete(ctx->dst_converter);
     }
 }
 
@@ -576,7 +576,7 @@ CVPX_to_CVPX_converter_Create(filter_t *filter, bool to_rgba)
     converter->p_module = module_need(converter, "video converter", NULL, false);
     if (!converter->p_module)
     {
-        vlc_object_release(converter);
+        vlc_object_delete(converter);
         return NULL;
     }
 
index 0525597..2ce6959 100644 (file)
@@ -182,7 +182,7 @@ static int Create( vlc_object_t *p_this )
     {
         msg_Err( p_filter, "can't open internal opencv filter: %s", p_sys->psz_inner_name );
         free( p_sys->psz_inner_name );
-        vlc_object_release( p_sys->p_opencv );
+        vlc_object_delete(p_sys->p_opencv);
         free( p_sys );
 
         return VLC_ENOMOD;
@@ -268,7 +268,7 @@ static void Destroy( vlc_object_t *p_this )
 
     // Release the internal OpenCV filter.
     module_unneed( p_sys->p_opencv, p_sys->p_opencv->p_module );
-    vlc_object_release( p_sys->p_opencv );
+    vlc_object_delete(p_sys->p_opencv);
 
     free( p_sys );
 }
index 571af83..8a41fd6 100644 (file)
@@ -257,7 +257,7 @@ static void Close(vout_display_t *vd)
             assert(((struct gl_sys *)sys->gl->sys)->locked_ctx == NULL);
             free(sys->gl->sys);
         }
-        vlc_object_release(sys->gl);
+        vlc_object_delete(sys->gl);
     }
 
     free(sys);
index 6105247..e55d899 100644 (file)
@@ -243,7 +243,7 @@ static void Close(vout_display_t *vd)
                     flushed = YES;
                 }
             }
-            vlc_object_release(sys->gl);
+            vlc_object_delete(sys->gl);
         }
 
         [sys->glESView cleanAndRelease:flushed];
index 3b2cede..e44e4f5 100644 (file)
@@ -209,7 +209,7 @@ static int Open (vout_display_t *vd, const vout_display_cfg_t *cfg,
         struct gl_sys *glsys = sys->gl->sys = malloc(sizeof(struct gl_sys));
         if( unlikely( !sys->gl->sys ) )
         {
-            vlc_object_release(sys->gl);
+            vlc_object_delete(sys->gl);
             goto error;
         }
         glsys->locked_ctx = NULL;
@@ -290,7 +290,7 @@ static void Close(vout_display_t *vd)
         {
             assert(((struct gl_sys *)sys->gl->sys)->locked_ctx == NULL);
             free(sys->gl->sys);
-            vlc_object_release(sys->gl);
+            vlc_object_delete(sys->gl);
         }
 
         [sys->glView release];
index 3028341..d9a8f44 100644 (file)
@@ -576,7 +576,7 @@ opengl_deinit_program(vout_display_opengl_t *vgl, struct prgm *prgm)
         pl_context_destroy(&tc->pl_ctx);
 #endif
 
-    vlc_object_release(tc);
+    vlc_object_delete(tc);
 }
 
 static int
@@ -641,7 +641,7 @@ opengl_init_program(vout_display_opengl_t *vgl, vlc_video_context *context,
 
         if (desc == NULL)
         {
-            vlc_object_release(tc);
+            vlc_object_delete(tc);
             return VLC_EGENERIC;
         }
         if (desc->plane_count == 0)
@@ -663,7 +663,7 @@ opengl_init_program(vout_display_opengl_t *vgl, vlc_video_context *context,
 
     if (ret != VLC_SUCCESS)
     {
-        vlc_object_release(tc);
+        vlc_object_delete(tc);
         return VLC_EGENERIC;
     }
 
index 011962b..0e9aca2 100644 (file)
@@ -128,7 +128,7 @@ static void vlc_vidsplit_Close(vout_display_t *vd)
     module_unneed(&sys->splitter, sys->splitter.p_module);
     video_format_Clean(&sys->splitter.fmt);
     vlc_mutex_destroy(&sys->lock);
-    vlc_object_release(&sys->splitter);
+    vlc_object_delete(&sys->splitter);
 }
 
 static void vlc_vidsplit_window_Resized(vout_window_t *wnd,
@@ -257,7 +257,7 @@ static int vlc_vidsplit_Open(vout_display_t *vd,
     if (splitter->p_module == NULL) {
         video_format_Clean(&splitter->fmt);
         vlc_mutex_destroy(&sys->lock);
-        vlc_object_release(splitter);
+        vlc_object_delete(splitter);
         return VLC_EGENERIC;
     }
 
index d749e0d..3cafa5a 100644 (file)
@@ -55,7 +55,7 @@ vlc_vk_t *vlc_vk_Create(struct vout_window_t *wnd, const char *name)
     vk->module = module_need(vk, "vulkan", name, true);
     if (vk->module == NULL)
     {
-        vlc_object_release(vk);
+        vlc_object_delete(vk);
         return NULL;
     }
     vlc_atomic_rc_init(&vk->ref_count);
@@ -73,5 +73,5 @@ void vlc_vk_Release(vlc_vk_t *vk)
     if (!vlc_atomic_rc_dec(&vk->ref_count))
         return;
     module_unneed(vk, vk->module);
-    vlc_object_release(vk);
+    vlc_object_delete(vk);
 }
index b0286b7..7d5cc3a 100644 (file)
@@ -138,7 +138,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
     free(modlist);
     if (!sys->gl)
     {
-        vlc_object_release(embed_cfg.window);
+        vlc_object_delete(embed_cfg.window);
         goto error;
     }
 
@@ -190,7 +190,7 @@ static void Close(vout_display_t *vd)
             vlc_gl_ReleaseCurrent (gl);
         }
         vlc_gl_Release (gl);
-        vlc_object_release(surface);
+        vlc_object_delete(surface);
     }
 
     CommonClean(vd);
index b62cf93..c25e11f 100644 (file)
@@ -78,7 +78,7 @@ static filter_t *CreateFilter(vlc_object_t *obj, const char *type,
 
     if (filter->p_module == NULL)
     {
-        vlc_object_release (filter);
+        vlc_object_delete(filter);
         filter = NULL;
     }
     else
@@ -115,7 +115,7 @@ static void aout_FiltersPipelineDestroy(filter_t *const *filters, unsigned n)
         filter_t *p_filter = filters[i];
 
         module_unneed( p_filter, p_filter->p_module );
-        vlc_object_release( p_filter );
+        vlc_object_delete(p_filter);
     }
 }
 
@@ -427,7 +427,7 @@ static int AppendFilter(vlc_object_t *obj, const char *type, const char *name,
     {
         msg_Err (filter, "cannot add user %s \"%s\" (skipped)", type, name);
         module_unneed (filter, filter->p_module);
-        vlc_object_release (filter);
+        vlc_object_delete(filter);
         return -1;
     }
 
index 95ed7da..be7c386 100644 (file)
@@ -262,7 +262,7 @@ audio_output_t *aout_New (vlc_object_t *parent)
     if (owner->module == NULL)
     {
         msg_Err (aout, "no suitable audio output module");
-        vlc_object_release (aout);
+        vlc_object_delete(aout);
         return NULL;
     }
 
@@ -378,7 +378,7 @@ void aout_Destroy (audio_output_t *aout)
     var_SetFloat (aout, "volume", -1.f);
     var_DelCallback(aout, "volume", var_Copy, vlc_object_parent(aout));
     var_DelCallback (aout, "stereo-mode", StereoModeCallback, NULL);
-    vlc_object_release (aout);
+    vlc_object_delete(aout);
 }
 
 /**
index 679a61a..b86bb1d 100644 (file)
@@ -116,7 +116,7 @@ void aout_volume_Delete(aout_volume_t *vol)
         module_unneed(obj, vol->module);
     var_DelCallback(vlc_object_parent(obj), "audio-replay-gain-mode",
                     ReplayGainCallback, vol);
-    vlc_object_release(obj);
+    vlc_object_delete(obj);
 }
 
 void aout_volume_SetVolume(aout_volume_t *vol, float factor)
index b4f1531..eab763f 100644 (file)
@@ -315,7 +315,7 @@ stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,
         s->psz_url = strdup(access->psz_url);
         if (unlikely(s->psz_url == NULL))
         {
-            vlc_object_release(s);
+            vlc_object_delete(s);
             vlc_stream_Delete(access);
             return NULL;
         }
index 38d3b81..096340f 100644 (file)
@@ -1848,7 +1848,7 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
     p_owner->p_fifo = block_FifoNew();
     if( unlikely(p_owner->p_fifo == NULL) )
     {
-        vlc_object_release( p_dec );
+        vlc_object_delete(p_dec);
         return NULL;
     }
 
@@ -1868,7 +1868,7 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
         {
             if( LoadDecoder( p_owner->p_packetizer, true, fmt ) )
             {
-                vlc_object_release( p_owner->p_packetizer );
+                vlc_object_delete(p_owner->p_packetizer);
                 p_owner->p_packetizer = NULL;
             }
             else
index d7380ff..3d1c574 100644 (file)
@@ -70,7 +70,7 @@ void decoder_Destroy( decoder_t *p_dec )
     if (p_dec != NULL)
     {
         decoder_Clean( p_dec );
-        vlc_object_release( p_dec );
+        vlc_object_delete(p_dec);
     }
 }
 
@@ -138,7 +138,7 @@ vlc_decoder_device_Create(vout_window_t *window)
     free(name);
     if (!priv->module)
     {
-        vlc_object_release(&priv->device);
+        vlc_object_delete(&priv->device);
         return NULL;
     }
     vlc_atomic_rc_init(&priv->rc);
@@ -162,6 +162,6 @@ vlc_decoder_device_Release(vlc_decoder_device *device)
     if (vlc_atomic_rc_dec(&priv->rc))
     {
         vlc_module_unload(priv->module, decoder_device_Close, device);
-        vlc_object_release(device);
+        vlc_object_delete(device);
     }
 }
index 8c19994..d7b5ce3 100644 (file)
@@ -431,7 +431,7 @@ decoder_t *demux_PacketizerNew( demux_t *p_demux, es_format_t *p_fmt, const char
     if( !p_packetizer->p_module )
     {
         es_format_Clean( p_fmt );
-        vlc_object_release( p_packetizer );
+        vlc_object_delete(p_packetizer);
         msg_Err( p_demux, "cannot find packetizer for %s", psz_msg );
         return NULL;
     }
@@ -447,7 +447,7 @@ void demux_PacketizerDestroy( decoder_t *p_packetizer )
     es_format_Clean( &p_packetizer->fmt_out );
     if( p_packetizer->p_description )
         vlc_meta_Delete( p_packetizer->p_description );
-    vlc_object_release( p_packetizer );
+    vlc_object_delete(p_packetizer);
 }
 
 unsigned demux_TestAndClearFlags( demux_t *p_demux, unsigned flags )
index c5e5f43..b4c7aa5 100644 (file)
@@ -232,7 +232,7 @@ void input_Close( input_thread_t *p_input )
     if( input_priv(p_input)->is_running )
         vlc_join( input_priv(p_input)->thread, NULL );
     vlc_interrupt_deinit( &input_priv(p_input)->interrupt );
-    vlc_object_release( p_input );
+    vlc_object_delete(p_input);
 }
 
 void input_SetTime( input_thread_t *p_input, vlc_tick_t i_time, bool b_fast )
@@ -2864,7 +2864,7 @@ static void InputSourceMeta( input_thread_t *p_input,
         }
         module_unneed( p_demux, p_id3 );
     }
-    vlc_object_release( p_demux_meta );
+    vlc_object_delete(p_demux_meta);
 }
 
 
index 29e61aa..830c798 100644 (file)
@@ -1706,7 +1706,7 @@ void vlc_readdir_helper_init(struct vlc_readdir_helper *p_rdh,
     TAB_INIT(p_rdh->i_dirs, p_rdh->pp_dirs);
 
     if (p_var_obj != NULL)
-        vlc_object_release(p_var_obj);
+        vlc_object_delete(p_var_obj);
 }
 
 void vlc_readdir_helper_finish(struct vlc_readdir_helper *p_rdh, bool b_success)
index 3453d71..a06fbab 100644 (file)
@@ -264,11 +264,11 @@ int input_item_WriteMeta( vlc_object_t *obj, input_item_t *p_item )
     module_t *p_mod = module_need( p_export, "meta writer", NULL, false );
     if( p_mod )
         module_unneed( p_export, p_mod );
-    vlc_object_release( p_export );
+    vlc_object_delete(p_export);
     return VLC_SUCCESS;
 
 error:
-    vlc_object_release( p_export );
+    vlc_object_delete(p_export);
     return VLC_EGENERIC;
 }
 
index 20fa3a3..34a39ee 100644 (file)
@@ -3475,7 +3475,7 @@ vlc_player_Delete(vlc_player_t *player)
     if (player->renderer)
         vlc_renderer_item_release(player->renderer);
 
-    vlc_object_release(player);
+    vlc_object_delete(player);
 }
 
 vlc_player_t *
@@ -3596,6 +3596,6 @@ error:
     if (player->resource)
         input_resource_Release(player->resource);
 
-    vlc_object_release(player);
+    vlc_object_delete(player);
     return NULL;
 }
index f2a833f..dbb6d59 100644 (file)
@@ -133,5 +133,5 @@ void vlc_sd_Destroy(services_discovery_t *sd)
         module_unneed(sd, sd->p_module);
     config_ChainDestroy(sd->p_cfg);
     free(sd->psz_name);
-    vlc_object_release(sd);
+    vlc_object_delete(sd);
 }
index 6019c95..35c5a04 100644 (file)
@@ -124,7 +124,7 @@ void stream_CommonDelete(stream_t *s)
         block_Release(priv->block);
 
     free(s->psz_url);
-    vlc_object_release(s);
+    vlc_object_delete(s);
 }
 
 /**
index b5bdd01..f340646 100644 (file)
@@ -128,7 +128,7 @@ static void se_Release( struct stream_extractor_private* priv )
             vlc_stream_Delete( priv->source );
     }
 
-    vlc_object_release( priv->object );
+    vlc_object_delete(priv->object);
 }
 
 /**
index c99406a..93396ae 100644 (file)
@@ -157,7 +157,7 @@ vlm_t *vlm_New( libvlc_int_t *libvlc, const char *psz_vlmconf )
         vlc_cond_destroy( &p_vlm->wait_manage );
         vlc_mutex_destroy( &p_vlm->lock );
         vlc_mutex_destroy( &p_vlm->lock_manage );
-        vlc_object_release( p_vlm );
+        vlc_object_delete(p_vlm);
         vlc_mutex_unlock( &vlm_mutex );
         return NULL;
     }
@@ -221,7 +221,7 @@ void vlm_Delete( vlm_t *p_vlm )
     if( p_vlm->p_vod )
     {
         module_unneed( p_vlm->p_vod, p_vlm->p_vod->p_module );
-        vlc_object_release( p_vlm->p_vod );
+        vlc_object_delete(p_vlm->p_vod);
     }
 
     libvlc_priv(vlc_object_instance(p_vlm))->p_vlm = NULL;
@@ -232,7 +232,7 @@ void vlm_Delete( vlm_t *p_vlm )
     vlc_cond_destroy( &p_vlm->wait_manage );
     vlc_mutex_destroy( &p_vlm->lock );
     vlc_mutex_destroy( &p_vlm->lock_manage );
-    vlc_object_release( p_vlm );
+    vlc_object_delete(p_vlm);
 }
 
 /*****************************************************************************
@@ -735,7 +735,7 @@ 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_release( p_vlm->p_vod );
+            vlc_object_delete(p_vlm->p_vod);
             p_vlm->p_vod = NULL;
             return VLC_EGENERIC;
         }
@@ -751,7 +751,7 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
 
     if( asprintf( &header, _("Media: %s"), p_cfg->psz_name ) == -1 )
     {
-        vlc_object_release( p_media );
+        vlc_object_delete(p_media);
         return VLC_ENOMEM;
     }
 
@@ -760,7 +760,7 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
 
     if( p_media->obj.logger == NULL )
     {
-        vlc_object_release( p_media );
+        vlc_object_delete(p_media);
         return VLC_ENOMEM;
     }
 
@@ -812,7 +812,7 @@ static int vlm_ControlMediaDel( vlm_t *p_vlm, int64_t id )
 
     TAB_REMOVE( p_vlm->i_media, p_vlm->media, p_media );
     vlc_LogDestroy( p_media->obj.logger );
-    vlc_object_release( p_media );
+    vlc_object_delete(p_media);
 
     return VLC_SUCCESS;
 }
@@ -904,7 +904,7 @@ static void vlm_MediaInstanceDelete( vlm_t *p_vlm, int64_t id, vlm_media_instanc
     }
     input_resource_Terminate( p_instance->p_input_resource );
     input_resource_Release( p_instance->p_input_resource );
-    vlc_object_release( p_instance->p_parent );
+    vlc_object_delete(p_instance->p_parent);
 
     TAB_REMOVE( p_media->i_instance, p_media->instance, p_instance );
     input_item_Release( p_instance->p_item );
index 0bdc5a8..9f91ee4 100644 (file)
@@ -122,7 +122,7 @@ error:
     if( p_intf->p_module )
         module_unneed( p_intf, p_intf->p_module );
     config_ChainDestroy( p_intf->p_cfg );
-    vlc_object_release( p_intf );
+    vlc_object_delete(p_intf);
     return VLC_EGENERIC;
 }
 
@@ -311,7 +311,7 @@ void intf_DestroyAll(libvlc_int_t *libvlc)
             module_unneed(intf, intf->p_module);
             config_ChainDestroy(intf->p_cfg);
             var_DelCallback(intf, "intf-add", AddIntfCallback, playlist);
-            vlc_object_release(intf);
+            vlc_object_delete(intf);
 
             vlc_mutex_lock(&lock);
         }
index 8e8d2ca..62d8d94 100644 (file)
@@ -450,7 +450,7 @@ void libvlc_InternalDestroy( libvlc_int_t *p_libvlc )
     vlc_ExitDestroy( &priv->exit );
 
     assert( atomic_load(&(vlc_internals(p_libvlc)->refs)) == 1 );
-    vlc_object_release( p_libvlc );
+    vlc_object_delete(p_libvlc);
 }
 
 /*****************************************************************************
index 973570b..d02be7a 100644 (file)
@@ -222,7 +222,7 @@ ReleaseObject(void *obj)
 #ifdef TEST_MEDIA_SOURCE
     free(obj);
 #else
-    vlc_object_release((vlc_object_t *) obj);
+    vlc_object_delete((vlc_media_source_provider_t *)obj);
 #endif
 }
 
index 58ecf8c..1e19943 100644 (file)
@@ -319,7 +319,7 @@ static void LoadLocalStorage( addons_manager_t *p_manager )
 
         ARRAY_RESET( p_finder->entries );
     }
-    vlc_object_release( p_finder );
+    vlc_object_delete(p_finder);
 }
 
 static void finder_thread_interrupted( void* p_data )
@@ -376,7 +376,7 @@ static void *FinderThread( void *p_data )
             }
             ARRAY_RESET( p_finder->entries );
             free( psz_uri );
-            vlc_object_release( p_finder );
+            vlc_object_delete(p_finder);
         }
 
         p_manager->owner.discovery_ended( p_manager );
@@ -406,7 +406,7 @@ static int addons_manager_WriteCatalog( addons_manager_t *p_manager )
         vlc_mutex_unlock( &p_manager->p_priv->finder.lock );
         module_unneed( p_storage, p_module );
     }
-    vlc_object_release( p_storage );
+    vlc_object_delete(p_storage);
 
     return i_return;
 }
@@ -443,7 +443,7 @@ static int installOrRemoveAddon( addons_manager_t *p_manager, addon_entry_t *p_e
             vlc_mutex_unlock( &p_entry->lock );
         }
     }
-    vlc_object_release( p_storage );
+    vlc_object_delete(p_storage);
 
     return i_return;
 }
index 465677a..49131f4 100644 (file)
@@ -173,7 +173,7 @@ void filter_DeleteBlend( filter_t *p_blend )
     if( p_blend->p_module )
         module_unneed( p_blend, p_blend->p_module );
 
-    vlc_object_release( p_blend );
+    vlc_object_delete(p_blend);
 }
 
 /* */
@@ -207,7 +207,6 @@ void video_splitter_Delete( video_splitter_t *p_splitter )
         module_unneed( p_splitter, p_splitter->p_module );
 
     video_format_Clean( &p_splitter->fmt );
-
-    vlc_object_release( p_splitter );
+    vlc_object_delete(p_splitter);
 }
 
index ff6b2ee..ffb5ba4 100644 (file)
@@ -265,7 +265,7 @@ error:
         msg_Err( parent, "Failed to create %s", capability );
     es_format_Clean( &filter->fmt_out );
     es_format_Clean( &filter->fmt_in );
-    vlc_object_release( filter );
+    vlc_object_delete(filter);
     return NULL;
 }
 
@@ -315,7 +315,7 @@ void filter_chain_DeleteFilter( filter_chain_t *chain, filter_t *filter )
     es_format_Clean( &filter->fmt_out );
     es_format_Clean( &filter->fmt_in );
 
-    vlc_object_release( filter );
+    vlc_object_delete(filter);
     /* FIXME: check fmt_in/fmt_out consitency */
 }
 
index 725b70e..b41fb41 100644 (file)
@@ -43,7 +43,7 @@ fingerprinter_thread_t *fingerprinter_Create( vlc_object_t *p_this )
                                            NULL, false );
     if( !p_fingerprint->p_module )
     {
-        vlc_object_release( p_fingerprint );
+        vlc_object_delete(p_fingerprint);
         msg_Err( p_this, "AcoustID fingerprinter not found" );
         return NULL;
     }
@@ -54,5 +54,5 @@ fingerprinter_thread_t *fingerprinter_Create( vlc_object_t *p_this )
 void fingerprinter_Destroy( fingerprinter_thread_t *p_fingerprint )
 {
     module_unneed( p_fingerprint, p_fingerprint->p_module );
-    vlc_object_release( p_fingerprint );
+    vlc_object_delete(p_fingerprint);
 }
index fc381a9..9d7e5ad 100644 (file)
@@ -776,7 +776,7 @@ static void DeleteEncoder( encoder_t * p_enc )
     es_format_Clean( &p_enc->fmt_in );
     es_format_Clean( &p_enc->fmt_out );
 
-    vlc_object_release( p_enc );
+    vlc_object_delete(p_enc);
 }
 
 static picture_t *filter_new_picture( filter_t *p_filter )
@@ -825,5 +825,5 @@ static void DeleteConverter( filter_t * p_filter )
     es_format_Clean( &p_filter->fmt_in );
     es_format_Clean( &p_filter->fmt_out );
 
-    vlc_object_release( p_filter );
+    vlc_object_delete(p_filter);
 }
index 8816837..55b0943 100644 (file)
@@ -43,7 +43,7 @@ keystore_create(vlc_object_t *p_parent, const char *psz_name)
     p_keystore->p_module = module_need(p_keystore, "keystore", psz_name, true);
     if (p_keystore->p_module == NULL)
     {
-        vlc_object_release(p_keystore);
+        vlc_object_delete(p_keystore);
         return NULL;
     }
     assert(p_keystore->pf_store);
@@ -72,7 +72,7 @@ vlc_keystore_release(vlc_keystore *p_keystore)
     assert(p_keystore);
     module_unneed(p_keystore, p_keystore->p_module);
 
-    vlc_object_release(p_keystore);
+    vlc_object_delete(p_keystore);
 }
 
 int
index 200e0b5..45c8678 100644 (file)
@@ -112,7 +112,7 @@ vlc_medialibrary_t* libvlc_MlCreate( libvlc_int_t* p_libvlc  )
     if ( p_ml->m.p_module == NULL )
     {
         vlc_mutex_destroy( &p_ml->lock );
-        vlc_object_release( &p_ml->m );
+        vlc_object_delete(&p_ml->m);
         return NULL;
     }
     return p_ml;
@@ -124,7 +124,7 @@ void libvlc_MlRelease( vlc_medialibrary_t* p_ml )
     module_unneed( &p_ml->m, p_ml->m.p_module );
     assert( vlc_list_is_empty( &p_ml->cbs ) );
     vlc_mutex_destroy( &p_ml->lock );
-    vlc_object_release( &p_ml->m );
+    vlc_object_delete(&p_ml->m);
 }
 
 #undef vlc_ml_instance_get
index 2a6e904..41f0d23 100644 (file)
@@ -410,7 +410,7 @@ static void vlc_LogModuleClose(void *d)
     if (module->ops->destroy != NULL)
         module->ops->destroy(module->opaque);
 
-    vlc_object_release(VLC_OBJECT(module));
+    vlc_object_delete(VLC_OBJECT(module));
 }
 
 static const struct vlc_logger_operations module_ops = {
@@ -429,7 +429,7 @@ static struct vlc_logger *vlc_LogModuleCreate(vlc_object_t *parent)
     /* TODO: module configuration item */
     if (vlc_module_load(VLC_OBJECT(module), "logger", NULL, false,
                         vlc_logger_load, module) == NULL) {
-        vlc_object_release(VLC_OBJECT(module));
+        vlc_object_delete(VLC_OBJECT(module));
         return NULL;
     }
 
index 498909b..08fe541 100644 (file)
@@ -49,6 +49,6 @@ void *vlc_probe (vlc_object_t *obj,
 
     void *ret = probe->list;
     *pcount = probe->count;
-    vlc_object_release (probe);
+    vlc_object_delete(probe);
     return ret;
 }
index cc5d619..0fe57c9 100644 (file)
@@ -236,7 +236,7 @@ void vlc_rd_release(vlc_renderer_discovery_t *p_rd)
     module_unneed(p_rd, p_rd->p_module);
     config_ChainDestroy(p_rd->p_cfg);
     free(p_rd->psz_name);
-    vlc_object_release(p_rd);
+    vlc_object_delete(p_rd);
 }
 
 vlc_renderer_discovery_t *
@@ -259,7 +259,7 @@ vlc_rd_new(vlc_object_t *p_obj, const char *psz_name,
             psz_name);
         free(p_rd->psz_name);
         config_ChainDestroy(p_rd->p_cfg);
-        vlc_object_release(p_rd);
+        vlc_object_delete(p_rd);
         p_rd = NULL;
     }
 
index f632b8f..f5d6dc4 100644 (file)
@@ -144,7 +144,7 @@ void update_Delete( update_t *p_update )
     {
         atomic_store( &p_update->p_download->aborted, true );
         vlc_join( p_update->p_download->thread, NULL );
-        vlc_object_release( p_update->p_download );
+        vlc_object_delete(p_update->p_download);
     }
 
     vlc_mutex_destroy( &p_update->lock );
@@ -507,7 +507,7 @@ void update_Download( update_t *p_update, const char *psz_destdir )
     {
         atomic_store( &p_update->p_download->aborted, true );
         vlc_join( p_update->p_download->thread, NULL );
-        vlc_object_release( p_update->p_download );
+        vlc_object_delete(p_update->p_download);
     }
 
     update_download_thread_t *p_udt =
index 3f9f678..6afbec1 100644 (file)
@@ -45,7 +45,7 @@ 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_release( p_xml );
+        vlc_object_delete(p_xml);
         msg_Err( p_this, "XML provider not found" );
         return NULL;
     }
@@ -59,7 +59,7 @@ 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_release( p_xml );
+    vlc_object_delete(p_xml);
 }
 
 
@@ -81,7 +81,7 @@ xml_reader_t *xml_ReaderCreate(vlc_object_t *obj, stream_t *stream)
     if (unlikely(reader->p_module == NULL))
     {
         msg_Err(reader, "XML reader not found");
-        vlc_object_release(reader);
+        vlc_object_delete(reader);
         return NULL;
     }
     return reader;
@@ -95,5 +95,5 @@ xml_reader_t *xml_ReaderCreate(vlc_object_t *obj, stream_t *stream)
 void xml_ReaderDelete(xml_reader_t *reader)
 {
     module_unneed(reader, reader->p_module);
-    vlc_object_release(reader);
+    vlc_object_delete(reader);
 }
index d35fd68..b249c99 100644 (file)
@@ -976,7 +976,7 @@ error:
         net_ListenClose(host->fds);
         vlc_cond_destroy(&host->wait);
         vlc_mutex_destroy(&host->lock);
-        vlc_object_release(host);
+        vlc_object_delete(host);
     }
 
     vlc_tls_ServerDelete(p_tls);
@@ -1013,7 +1013,7 @@ void httpd_HostDelete(httpd_host_t *host)
     net_ListenClose(host->fds);
     vlc_cond_destroy(&host->wait);
     vlc_mutex_destroy(&host->lock);
-    vlc_object_release(host);
+    vlc_object_delete(host);
     vlc_mutex_unlock(&httpd.mutex);
 }
 
index 305b73c..2fde82d 100644 (file)
@@ -88,7 +88,7 @@ vlc_tls_ServerCreate (vlc_object_t *obj, const char *cert_path,
                         tls_server_load, srv, cert_path, key_path) == NULL)
     {
         msg_Err (srv, "TLS server plugin not available");
-        vlc_object_release (srv);
+        vlc_object_delete(srv);
         return NULL;
     }
 
@@ -102,7 +102,7 @@ void vlc_tls_ServerDelete(vlc_tls_server_t *crd)
 
     crd->ops->destroy(crd);
     vlc_objres_clear(VLC_OBJECT(crd));
-    vlc_object_release(crd);
+    vlc_object_delete(crd);
 }
 
 vlc_tls_client_t *vlc_tls_ClientCreate(vlc_object_t *obj)
@@ -116,7 +116,7 @@ vlc_tls_client_t *vlc_tls_ClientCreate(vlc_object_t *obj)
                         tls_client_load, crd) == NULL)
     {
         msg_Err (crd, "TLS client plugin not available");
-        vlc_object_release (crd);
+        vlc_object_delete(crd);
         return NULL;
     }
 
@@ -130,7 +130,7 @@ void vlc_tls_ClientDelete(vlc_tls_client_t *crd)
 
     crd->ops->destroy(crd);
     vlc_objres_clear(VLC_OBJECT(crd));
-    vlc_object_release (crd);
+    vlc_object_delete(crd);
 }
 
 
index cac6c16..c68502c 100644 (file)
@@ -342,7 +342,7 @@ void playlist_Destroy( playlist_t *p_playlist )
         vlc_http_cookies_destroy( cookies );
     }
 
-    vlc_object_release( p_playlist );
+    vlc_object_delete(p_playlist);
 }
 
 /** Get current playing input.
index f87cc9c..3d65aef 100644 (file)
@@ -82,7 +82,7 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename,
    fclose( p_export->p_file );
 out:
    free( p_export->base_url );
-   vlc_object_release( p_export );
+   vlc_object_delete(p_export);
    return ret;
 }
 
@@ -104,6 +104,6 @@ int playlist_Import( playlist_t *p_playlist, const char *psz_file )
 
     int ret = input_Read( dummy, p_input, NULL, NULL );
 
-    vlc_object_release( dummy );
+    vlc_object_delete(dummy);
     return ret;
 }
index bdae8bf..14dcaab 100644 (file)
@@ -158,7 +158,7 @@ static int InvokeModule( input_fetcher_t* fetcher, input_item_t* item,
     if( mf_module )
         module_unneed( mf, mf_module );
 
-    vlc_object_release( mf );
+    vlc_object_delete(mf);
 
     return VLC_SUCCESS;
 }
index 730e536..4c8bba8 100644 (file)
@@ -132,7 +132,7 @@ sout_instance_t *sout_NewInstance( vlc_object_t *p_parent, const char *psz_dest
     FREENULL( p_sout->psz_sout );
 
     vlc_mutex_destroy( &p_sout->lock );
-    vlc_object_release( p_sout );
+    vlc_object_delete(p_sout);
     return NULL;
 }
 
@@ -150,7 +150,7 @@ void sout_DeleteInstance( sout_instance_t * p_sout )
     vlc_mutex_destroy( &p_sout->lock );
 
     /* *** free structure *** */
-    vlc_object_release( p_sout );
+    vlc_object_delete(p_sout);
 }
 
 /*****************************************************************************
@@ -310,7 +310,7 @@ sout_access_out_t *sout_AccessOutNew( vlc_object_t *p_sout,
         free( p_access->psz_path );
 error:
         free( p_access->psz_access );
-        vlc_object_release( p_access );
+        vlc_object_delete(p_access);
         return( NULL );
     }
 
@@ -331,7 +331,7 @@ void sout_AccessOutDelete( sout_access_out_t *p_access )
 
     free( p_access->psz_path );
 
-    vlc_object_release( p_access );
+    vlc_object_delete(p_access);
 }
 
 /*****************************************************************************
@@ -417,7 +417,7 @@ sout_mux_t * sout_MuxNew( sout_instance_t *p_sout, const char *psz_mux,
     {
         FREENULL( p_mux->psz_mux );
 
-        vlc_object_release( p_mux );
+        vlc_object_delete(p_mux);
         return NULL;
     }
 
@@ -475,7 +475,7 @@ void sout_MuxDelete( sout_mux_t *p_mux )
 
     config_ChainDestroy( p_mux->p_cfg );
 
-    vlc_object_release( p_mux );
+    vlc_object_delete(p_mux);
 }
 
 /*****************************************************************************
@@ -789,7 +789,7 @@ static void sout_StreamDelete( sout_stream_t *p_stream )
     config_ChainDestroy( p_stream->p_cfg );
 
     msg_Dbg( p_stream, "destroying chain done" );
-    vlc_object_release( p_stream );
+    vlc_object_delete(p_stream);
 }
 
 /* Destroy a "stream_out" modules chain
index e94ef05..cd775f9 100644 (file)
@@ -808,7 +808,7 @@ error:
     video_format_Clean(&vd->source);
     if (osys->video_context.device)
         vlc_decoder_device_Release(osys->video_context.device);
-    vlc_object_release(vd);
+    vlc_object_delete(vd);
     return NULL;
 }
 
@@ -832,5 +832,5 @@ void vout_display_Delete(vout_display_t *vd)
 
     video_format_Clean(&vd->source);
     video_format_Clean(&vd->fmt);
-    vlc_object_release(vd);
+    vlc_object_delete(vd);
 }
index 33d7369..43ca020 100644 (file)
@@ -47,7 +47,7 @@ vlc_inhibit_t *vlc_inhibit_Create (vlc_object_t *parent)
     priv->module = module_need (ih, "inhibit", NULL, false);
     if (priv->module == NULL)
     {
-        vlc_object_release (ih);
+        vlc_object_delete(ih);
         ih = NULL;
     }
     return ih;
@@ -58,5 +58,5 @@ void vlc_inhibit_Destroy (vlc_inhibit_t *ih)
     assert (ih != NULL);
 
     module_unneed (ih, ((inhibit_t *)ih)->module);
-    vlc_object_release (ih);
+    vlc_object_delete(ih);
 }
index 9f43a00..93527be 100644 (file)
@@ -90,7 +90,7 @@ vlc_gl_t *vlc_gl_Create(const struct vout_display_cfg *restrict cfg,
                                  cfg->display.width, cfg->display.height);
     if (gl->module == NULL)
     {
-        vlc_object_release(gl);
+        vlc_object_delete(gl);
         return NULL;
     }
     assert(gl->makeCurrent && gl->releaseCurrent && gl->swap
@@ -114,7 +114,7 @@ void vlc_gl_Release(vlc_gl_t *gl)
 
     vlc_module_unload(gl->module, vlc_gl_stop, gl);
     vlc_objres_clear(VLC_OBJECT(gl));
-    vlc_object_release(gl);
+    vlc_object_delete(gl);
 }
 
 #include <vlc_vout_window.h>
index ac2a406..fa70895 100644 (file)
@@ -1626,7 +1626,7 @@ void vout_Close(vout_thread_t *vout)
     sys->spu = NULL;
     vlc_mutex_unlock(&sys->spu_lock);
 
-    vlc_object_release(vout);
+    vlc_object_delete(vout);
 }
 
 static void VoutDestructor(vlc_object_t *object)
@@ -1720,7 +1720,7 @@ vout_thread_t *vout_Create(vlc_object_t *object)
 
     if (sys->display_cfg.window == NULL) {
         spu_Destroy(sys->spu);
-        vlc_object_release(vout);
+        vlc_object_delete(vout);
         return NULL;
     }
 
index b139638..7494423 100644 (file)
@@ -163,7 +163,7 @@ static void FilterRelease(filter_t *filter)
 {
     if (filter->p_module)
         module_unneed(filter, filter->p_module);
-    vlc_object_release(filter);
+    vlc_object_delete(filter);
 }
 
 static picture_t *spu_new_video_buffer(filter_t *filter)
@@ -1387,7 +1387,7 @@ void spu_Destroy(spu_t *spu)
 
     vlc_mutex_destroy(&sys->lock);
 
-    vlc_object_release(spu);
+    vlc_object_delete(spu);
 }
 
 /**
index 751da25..3be9ab7 100644 (file)
@@ -70,7 +70,7 @@ vout_window_t *vout_window_New(vlc_object_t *obj, const char *module,
     w->module = vlc_module_load(window, "vout window", module, false,
                                 vout_window_start, window);
     if (!w->module) {
-        vlc_object_release(window);
+        vlc_object_delete(window);
         return NULL;
     }
 
@@ -122,7 +122,7 @@ void vout_window_Delete(vout_window_t *window)
     if (window->ops->destroy != NULL)
         window->ops->destroy(window);
     vlc_objres_clear(VLC_OBJECT(window));
-    vlc_object_release(window);
+    vlc_object_delete(window);
 }
 
 void vout_window_SetInhibition(vout_window_t *window, bool enabled)
index 0825bef..5773996 100644 (file)
@@ -132,7 +132,7 @@ decoder_t *test_decoder_create(vlc_object_t *parent, const es_format_t *fmt)
     if (packetizer == NULL || owner == NULL)
     {
         if (packetizer)
-            vlc_object_release(packetizer);
+            vlc_object_delete(packetizer);
         return NULL;
     }
     decoder = &owner->dec;
@@ -172,22 +172,22 @@ decoder_t *test_decoder_create(vlc_object_t *parent, const es_format_t *fmt)
             decoder->cbs = &dec_spu_cbs;
             break;
         default:
-            vlc_object_release(packetizer);
-            vlc_object_release(decoder);
+            vlc_object_delete(packetizer);
+            vlc_object_delete(decoder);
             return NULL;
     }
 
     if (decoder_load(packetizer, true, fmt) != VLC_SUCCESS)
     {
-        vlc_object_release(packetizer);
-        vlc_object_release(decoder);
+        vlc_object_delete(packetizer);
+        vlc_object_delete(decoder);
         return NULL;
     }
 
     if (decoder_load(decoder, false, &packetizer->fmt_out) != VLC_SUCCESS)
     {
         decoder_Destroy(packetizer);
-        vlc_object_release(decoder);
+        vlc_object_delete(decoder);
         return NULL;
     }