[vlc-commits] aout: call aout_Destructor() directly
Rémi Denis-Courmont
git at videolan.org
Sun Mar 17 11:25:24 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 16 11:03:36 2019 +0200| [806b80a6fc49d4dacfaea80d8a9b2011ed27036c] | committer: Rémi Denis-Courmont
aout: call aout_Destructor() directly
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=806b80a6fc49d4dacfaea80d8a9b2011ed27036c
---
src/audio_output/output.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 33a73bb3d1..303b06bdfb 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -50,7 +50,7 @@ static void aout_OutputAssertLocked (audio_output_t *aout)
vlc_mutex_assert (&owner->lock);
}
-static void aout_Destructor( vlc_object_t * p_this );
+static void aout_Destructor(audio_output_t *);
static int var_Copy (vlc_object_t *src, const char *name, vlc_value_t prev,
vlc_value_t value, void *data)
@@ -246,8 +246,6 @@ audio_output_t *aout_New (vlc_object_t *parent)
atomic_init (&owner->vp.update, false);
atomic_init(&owner->refs, 0);
- vlc_object_set_destructor (aout, aout_Destructor);
-
/* Audio output module callbacks */
var_Create (aout, "volume", VLC_VAR_FLOAT);
var_AddCallback (aout, "volume", var_Copy, parent);
@@ -405,15 +403,15 @@ void aout_Release(audio_output_t *aout)
return;
atomic_thread_fence(memory_order_acquire);
+ aout_Destructor(aout);
vlc_object_delete(VLC_OBJECT(aout));
}
/**
* Destroys the audio output lock used (asynchronously) by interface functions.
*/
-static void aout_Destructor (vlc_object_t *obj)
+static void aout_Destructor(audio_output_t *aout)
{
- audio_output_t *aout = (audio_output_t *)obj;
aout_owner_t *owner = aout_owner (aout);
vlc_mutex_destroy (&owner->dev.lock);
More information about the vlc-commits
mailing list