[vlc-commits] objects: introduce vlc_object_delete()
Rémi Denis-Courmont
git at videolan.org
Wed Mar 6 21:57:51 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Mar 6 20:15:18 2019 +0200| [07b7122857a593feeb0ad5de93f2a00894530fee] | committer: Rémi Denis-Courmont
objects: introduce vlc_object_delete()
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=07b7122857a593feeb0ad5de93f2a00894530fee
---
include/vlc_objects.h | 15 ++++++++++++++-
lib/media_player.c | 4 ++--
modules/access/screen/screen.c | 4 ++--
modules/audio_filter/gain.c | 4 ++--
modules/audio_filter/scaletempo.c | 4 ++--
modules/audio_output/mmdevice.c | 6 +++---
modules/audio_output/winstore.c | 4 ++--
modules/codec/avcodec/va.c | 4 ++--
.../gui/macosx/windows/extensions/VLCExtensionsManager.m | 6 +++---
modules/gui/qt/extensions_manager.cpp | 8 ++++----
modules/gui/skins2/src/dialogs.cpp | 4 ++--
modules/hw/d3d11/d3d11_surface.c | 2 +-
modules/hw/d3d9/dxa9.c | 2 +-
modules/misc/addons/fsstorage.c | 2 +-
modules/stream_out/transcode/encoder/audio.c | 4 ++--
modules/stream_out/transcode/encoder/encoder.c | 4 ++--
modules/stream_out/transcode/encoder/video.c | 2 +-
modules/video_filter/blendbench.c | 4 ++--
modules/video_filter/ci_filters.m | 6 +++---
modules/video_filter/opencv_wrapper.c | 4 ++--
modules/video_output/caopengllayer.m | 2 +-
modules/video_output/ios.m | 2 +-
modules/video_output/macosx.m | 4 ++--
modules/video_output/opengl/vout_helper.c | 6 +++---
modules/video_output/splitter.c | 4 ++--
modules/video_output/vulkan/instance.c | 4 ++--
modules/video_output/win32/glwin32.c | 4 ++--
src/audio_output/filters.c | 6 +++---
src/audio_output/output.c | 4 ++--
src/audio_output/volume.c | 2 +-
src/input/access.c | 2 +-
src/input/decoder.c | 4 ++--
src/input/decoder_helpers.c | 6 +++---
src/input/demux.c | 4 ++--
src/input/input.c | 4 ++--
src/input/item.c | 2 +-
src/input/meta.c | 4 ++--
src/input/player.c | 4 ++--
src/input/services_discovery.c | 2 +-
src/input/stream.c | 2 +-
src/input/stream_extractor.c | 2 +-
src/input/vlm.c | 16 ++++++++--------
src/interface/interface.c | 4 ++--
src/libvlc.c | 2 +-
src/media_source/media_source.c | 2 +-
src/misc/addons.c | 8 ++++----
src/misc/filter.c | 5 ++---
src/misc/filter_chain.c | 4 ++--
src/misc/fingerprinter.c | 4 ++--
src/misc/image.c | 4 ++--
src/misc/keystore.c | 4 ++--
src/misc/medialibrary.c | 4 ++--
src/misc/messages.c | 4 ++--
src/misc/probe.c | 2 +-
src/misc/renderer_discovery.c | 4 ++--
src/misc/update.c | 4 ++--
src/misc/xml.c | 8 ++++----
src/network/httpd.c | 4 ++--
src/network/tls.c | 8 ++++----
src/playlist_legacy/engine.c | 2 +-
src/playlist_legacy/loadsave.c | 4 ++--
src/preparser/fetcher.c | 2 +-
src/stream_output/stream_output.c | 14 +++++++-------
src/video_output/display.c | 4 ++--
src/video_output/inhibit.c | 4 ++--
src/video_output/opengl.c | 4 ++--
src/video_output/video_output.c | 4 ++--
src/video_output/vout_subpictures.c | 4 ++--
src/video_output/window.c | 4 ++--
test/src/input/decoder.c | 12 ++++++------
70 files changed, 164 insertions(+), 152 deletions(-)
diff --git a/include/vlc_objects.h b/include/vlc_objects.h
index aef56e88ec..11692b2de7 100644
--- a/include/vlc_objects.h
+++ b/include/vlc_objects.h
@@ -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;
/**
diff --git a/lib/media_player.c b/lib/media_player.c
index 87e7f4f1aa..106e7d26b0 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -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);
}
diff --git a/modules/access/screen/screen.c b/modules/access/screen/screen.c
index 0b065900c0..0c472deaa8 100644
--- a/modules/access/screen/screen.c
+++ b/modules/access/screen/screen.c
@@ -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;
}
}
diff --git a/modules/audio_filter/gain.c b/modules/audio_filter/gain.c
index 5a95953bae..655d944304 100644
--- a/modules/audio_filter/gain.c
+++ b/modules/audio_filter/gain.c
@@ -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);
}
diff --git a/modules/audio_filter/scaletempo.c b/modules/audio_filter/scaletempo.c
index fc4f570c70..e30e12c7c1 100644
--- a/modules/audio_filter/scaletempo.c
+++ b/modules/audio_filter/scaletempo.c
@@ -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
diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index 294561552c..162c8350b7 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -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;
}
diff --git a/modules/audio_output/winstore.c b/modules/audio_output/winstore.c
index 8420c3a6bc..5205c9e5a4 100644
--- a/modules/audio_output/winstore.c
+++ b/modules/audio_output/winstore.c
@@ -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;
}
diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c
index d0b0b880d2..fe9884c714 100644
--- a/modules/codec/avcodec/va.c
+++ b/modules/codec/avcodec/va.c
@@ -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);
}
diff --git a/modules/gui/macosx/windows/extensions/VLCExtensionsManager.m b/modules/gui/macosx/windows/extensions/VLCExtensionsManager.m
index 52c7fdb4f2..5751c7261d 100644
--- a/modules/gui/macosx/windows/extensions/VLCExtensionsManager.m
+++ b/modules/gui/macosx/windows/extensions/VLCExtensionsManager.m
@@ -165,7 +165,7 @@
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;
@@ -184,7 +184,7 @@
_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;
}
@@ -290,7 +290,7 @@
_extensionDialogProvider = nil;
if (p_extensions_manager)
- vlc_object_release(p_extensions_manager);
+ vlc_object_delete(p_extensions_manager);
}
- (BOOL)isLoaded
diff --git a/modules/gui/qt/extensions_manager.cpp b/modules/gui/qt/extensions_manager.cpp
index 5bcc8d513a..52ad5ebb39 100644
--- a/modules/gui/qt/extensions_manager.cpp
+++ b/modules/gui/qt/extensions_manager.cpp
@@ -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;
}
diff --git a/modules/gui/skins2/src/dialogs.cpp b/modules/gui/skins2/src/dialogs.cpp
index 8ca54ad02f..fdb179978d 100644
--- a/modules/gui/skins2/src/dialogs.cpp
+++ b/modules/gui/skins2/src/dialogs.cpp
@@ -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;
}
diff --git a/modules/hw/d3d11/d3d11_surface.c b/modules/hw/d3d11/d3d11_surface.c
index 9393cdb0dc..5b16bbf84a 100644
--- a/modules/hw/d3d11/d3d11_surface.c
+++ b/modules/hw/d3d11/d3d11_surface.c
@@ -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)
diff --git a/modules/hw/d3d9/dxa9.c b/modules/hw/d3d9/dxa9.c
index f3876380bd..035d96aaee 100644
--- a/modules/hw/d3d9/dxa9.c
+++ b/modules/hw/d3d9/dxa9.c
@@ -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)
diff --git a/modules/misc/addons/fsstorage.c b/modules/misc/addons/fsstorage.c
index 6d264294ba..b76bff7186 100644
--- a/modules/misc/addons/fsstorage.c
+++ b/modules/misc/addons/fsstorage.c
@@ -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;
}
diff --git a/modules/stream_out/transcode/encoder/audio.c b/modules/stream_out/transcode/encoder/audio.c
index 6571663abd..d45f7a066c 100644
--- a/modules/stream_out/transcode/encoder/audio.c
+++ b/modules/stream_out/transcode/encoder/audio.c
@@ -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;
}
diff --git a/modules/stream_out/transcode/encoder/encoder.c b/modules/stream_out/transcode/encoder/encoder.c
index ac50cb062a..2cc0bf6e88 100644
--- a/modules/stream_out/transcode/encoder/encoder.c
+++ b/modules/stream_out/transcode/encoder/encoder.c
@@ -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;
}
diff --git a/modules/stream_out/transcode/encoder/video.c b/modules/stream_out/transcode/encoder/video.c
index ece2d3b0c6..062f89838a 100644
--- a/modules/stream_out/transcode/encoder/video.c
+++ b/modules/stream_out/transcode/encoder/video.c
@@ -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;
}
diff --git a/modules/video_filter/blendbench.c b/modules/video_filter/blendbench.c
index 02c45efe9e..f288638531 100644
--- a/modules/video_filter/blendbench.c
+++ b/modules/video_filter/blendbench.c
@@ -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;
diff --git a/modules/video_filter/ci_filters.m b/modules/video_filter/ci_filters.m
index 5eb4e0408d..700ddbae72 100644
--- a/modules/video_filter/ci_filters.m
+++ b/modules/video_filter/ci_filters.m
@@ -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;
}
diff --git a/modules/video_filter/opencv_wrapper.c b/modules/video_filter/opencv_wrapper.c
index 0525597c1b..2ce695913f 100644
--- a/modules/video_filter/opencv_wrapper.c
+++ b/modules/video_filter/opencv_wrapper.c
@@ -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 );
}
diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m
index 571af8370f..8a41fd6b61 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -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);
diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 6105247e5d..e55d899628 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -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];
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 3b2cedee33..e44e4f526e 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -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];
diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index 30283419a3..d9a8f4406b 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -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;
}
diff --git a/modules/video_output/splitter.c b/modules/video_output/splitter.c
index 011962bd0d..0e9aca24ae 100644
--- a/modules/video_output/splitter.c
+++ b/modules/video_output/splitter.c
@@ -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;
}
diff --git a/modules/video_output/vulkan/instance.c b/modules/video_output/vulkan/instance.c
index d749e0d34b..3cafa5a571 100644
--- a/modules/video_output/vulkan/instance.c
+++ b/modules/video_output/vulkan/instance.c
@@ -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);
}
diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index b0286b762e..7d5cc3a080 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -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);
diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
index b62cf93f04..c25e11f274 100644
--- a/src/audio_output/filters.c
+++ b/src/audio_output/filters.c
@@ -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;
}
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 95ed7dab97..be7c386f99 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -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);
}
/**
diff --git a/src/audio_output/volume.c b/src/audio_output/volume.c
index 679a61adce..b86bb1d36c 100644
--- a/src/audio_output/volume.c
+++ b/src/audio_output/volume.c
@@ -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)
diff --git a/src/input/access.c b/src/input/access.c
index b4f1531ff6..eab763f020 100644
--- a/src/input/access.c
+++ b/src/input/access.c
@@ -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;
}
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 38d3b81dcf..096340f34b 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -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
diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
index d7380fff0c..3d1c574cb7 100644
--- a/src/input/decoder_helpers.c
+++ b/src/input/decoder_helpers.c
@@ -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);
}
}
diff --git a/src/input/demux.c b/src/input/demux.c
index 8c199941ff..d7b5ce3711 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -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 )
diff --git a/src/input/input.c b/src/input/input.c
index c5e5f4379b..b4c7aa5b1e 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -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);
}
diff --git a/src/input/item.c b/src/input/item.c
index 29e61aac00..830c79895f 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -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)
diff --git a/src/input/meta.c b/src/input/meta.c
index 3453d71763..a06fbabda3 100644
--- a/src/input/meta.c
+++ b/src/input/meta.c
@@ -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;
}
diff --git a/src/input/player.c b/src/input/player.c
index 20fa3a3d39..34a39eec9a 100644
--- a/src/input/player.c
+++ b/src/input/player.c
@@ -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;
}
diff --git a/src/input/services_discovery.c b/src/input/services_discovery.c
index f2a833f075..dbb6d5934d 100644
--- a/src/input/services_discovery.c
+++ b/src/input/services_discovery.c
@@ -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);
}
diff --git a/src/input/stream.c b/src/input/stream.c
index 6019c95c62..35c5a04870 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -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);
}
/**
diff --git a/src/input/stream_extractor.c b/src/input/stream_extractor.c
index b5bdd0121a..f340646768 100644
--- a/src/input/stream_extractor.c
+++ b/src/input/stream_extractor.c
@@ -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);
}
/**
diff --git a/src/input/vlm.c b/src/input/vlm.c
index c99406ae4d..93396ae3ac 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -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 );
diff --git a/src/interface/interface.c b/src/interface/interface.c
index 0bdc5a86be..9f91ee4129 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -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);
}
diff --git a/src/libvlc.c b/src/libvlc.c
index 8e8d2ca8b2..62d8d945a2 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -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);
}
/*****************************************************************************
diff --git a/src/media_source/media_source.c b/src/media_source/media_source.c
index 973570b4ae..d02be7ad70 100644
--- a/src/media_source/media_source.c
+++ b/src/media_source/media_source.c
@@ -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
}
diff --git a/src/misc/addons.c b/src/misc/addons.c
index 58ecf8cecb..1e19943037 100644
--- a/src/misc/addons.c
+++ b/src/misc/addons.c
@@ -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;
}
diff --git a/src/misc/filter.c b/src/misc/filter.c
index 465677a12f..49131f4da5 100644
--- a/src/misc/filter.c
+++ b/src/misc/filter.c
@@ -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);
}
diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c
index ff6b2eefd2..ffb5ba4d4e 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -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 */
}
diff --git a/src/misc/fingerprinter.c b/src/misc/fingerprinter.c
index 725b70ea77..b41fb41ce3 100644
--- a/src/misc/fingerprinter.c
+++ b/src/misc/fingerprinter.c
@@ -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);
}
diff --git a/src/misc/image.c b/src/misc/image.c
index fc381a9ae2..9d7e5adea0 100644
--- a/src/misc/image.c
+++ b/src/misc/image.c
@@ -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);
}
diff --git a/src/misc/keystore.c b/src/misc/keystore.c
index 88168373e8..55b094350d 100644
--- a/src/misc/keystore.c
+++ b/src/misc/keystore.c
@@ -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
diff --git a/src/misc/medialibrary.c b/src/misc/medialibrary.c
index 200e0b5370..45c86782d1 100644
--- a/src/misc/medialibrary.c
+++ b/src/misc/medialibrary.c
@@ -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
diff --git a/src/misc/messages.c b/src/misc/messages.c
index 2a6e904682..41f0d23a09 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -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;
}
diff --git a/src/misc/probe.c b/src/misc/probe.c
index 498909b423..08fe54194d 100644
--- a/src/misc/probe.c
+++ b/src/misc/probe.c
@@ -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;
}
diff --git a/src/misc/renderer_discovery.c b/src/misc/renderer_discovery.c
index cc5d619d15..0fe57c9d99 100644
--- a/src/misc/renderer_discovery.c
+++ b/src/misc/renderer_discovery.c
@@ -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;
}
diff --git a/src/misc/update.c b/src/misc/update.c
index f632b8f609..f5d6dc4ebe 100644
--- a/src/misc/update.c
+++ b/src/misc/update.c
@@ -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 =
diff --git a/src/misc/xml.c b/src/misc/xml.c
index 3f9f678d04..6afbec139c 100644
--- a/src/misc/xml.c
+++ b/src/misc/xml.c
@@ -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);
}
diff --git a/src/network/httpd.c b/src/network/httpd.c
index d35fd689c1..b249c99213 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -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);
}
diff --git a/src/network/tls.c b/src/network/tls.c
index 305b73cd05..2fde82d61a 100644
--- a/src/network/tls.c
+++ b/src/network/tls.c
@@ -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);
}
diff --git a/src/playlist_legacy/engine.c b/src/playlist_legacy/engine.c
index cac6c16a98..c68502c1a2 100644
--- a/src/playlist_legacy/engine.c
+++ b/src/playlist_legacy/engine.c
@@ -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.
diff --git a/src/playlist_legacy/loadsave.c b/src/playlist_legacy/loadsave.c
index f87cc9cdac..3d65aef0b9 100644
--- a/src/playlist_legacy/loadsave.c
+++ b/src/playlist_legacy/loadsave.c
@@ -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;
}
diff --git a/src/preparser/fetcher.c b/src/preparser/fetcher.c
index bdae8bf758..14dcaab8ba 100644
--- a/src/preparser/fetcher.c
+++ b/src/preparser/fetcher.c
@@ -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;
}
diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c
index 730e536768..4c8bba8b5e 100644
--- a/src/stream_output/stream_output.c
+++ b/src/stream_output/stream_output.c
@@ -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
diff --git a/src/video_output/display.c b/src/video_output/display.c
index e94ef050f9..cd775f9ef4 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -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);
}
diff --git a/src/video_output/inhibit.c b/src/video_output/inhibit.c
index 33d7369a44..43ca020cb1 100644
--- a/src/video_output/inhibit.c
+++ b/src/video_output/inhibit.c
@@ -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);
}
diff --git a/src/video_output/opengl.c b/src/video_output/opengl.c
index 9f43a00d4e..93527beea7 100644
--- a/src/video_output/opengl.c
+++ b/src/video_output/opengl.c
@@ -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>
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index ac2a4060e7..fa708955aa 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -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;
}
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index b13963869d..7494423a3a 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -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);
}
/**
diff --git a/src/video_output/window.c b/src/video_output/window.c
index 751da25690..3be9ab72e3 100644
--- a/src/video_output/window.c
+++ b/src/video_output/window.c
@@ -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)
diff --git a/test/src/input/decoder.c b/test/src/input/decoder.c
index 0825befdd0..5773996b3f 100644
--- a/test/src/input/decoder.c
+++ b/test/src/input/decoder.c
@@ -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;
}
More information about the vlc-commits
mailing list