[vlc-devel] commit: Correctly release sout object when it has been kept ( Rafaël Carré )
git version control
git at videolan.org
Sun Apr 20 21:25:51 CEST 2008
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sun Apr 20 21:26:49 2008 +0200| [a5f3b25025d31eebdc86ebb7bce772e29f249130]
Correctly release sout object when it has been kept
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a5f3b25025d31eebdc86ebb7bce772e29f249130
---
src/libvlc-common.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/libvlc-common.c b/src/libvlc-common.c
index a3bb83b..bd432a9 100644
--- a/src/libvlc-common.c
+++ b/src/libvlc-common.c
@@ -943,6 +943,7 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
vout_thread_t * p_vout = NULL;
aout_instance_t * p_aout = NULL;
announce_handler_t * p_announce = NULL;
+ sout_instance_t * p_sout = NULL;
/* Ask the interfaces to stop and destroy them */
msg_Dbg( p_libvlc, "removing all interfaces" );
@@ -977,6 +978,15 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
aout_Delete( p_aout );
}
+ p_sout = vlc_object_find( p_libvlc, VLC_OBJECT_SOUT, FIND_CHILD );
+ if( p_sout )
+ {
+ msg_Dbg( p_sout, "removing kept stream output" );
+ vlc_object_detach( (vlc_object_t*)p_sout );
+ vlc_object_release( (vlc_object_t*)p_sout );
+ sout_DeleteInstance( p_sout );
+ }
+
/* Destroy VLM if created in libvlc_InternalInit */
if( p_libvlc->p_vlm )
{
More information about the vlc-devel
mailing list