[vlc-devel] commit: Fix race condition while removing video outputs ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Jul 5 16:28:01 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Jul 5 17:27:30 2008 +0300| [69022122e6df8208d33a5809674e1f6b9bd4bcbb]
Fix race condition while removing video outputs
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=69022122e6df8208d33a5809674e1f6b9bd4bcbb
---
src/libvlc.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/libvlc.c b/src/libvlc.c
index f31f150..e16c14c 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -970,11 +970,11 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
/* Free video outputs */
msg_Dbg( p_libvlc, "removing all video outputs" );
- while( (p_vout = vlc_object_find( p_libvlc, VLC_OBJECT_VOUT, FIND_CHILD )) )
+ vlc_list_t *list = vlc_list_find (p_libvlc, VLC_OBJECT_VOUT, FIND_CHILD);
+ for (unsigned i = 0; i < list->i_count; i++)
{
- vlc_object_detach( p_vout );
- vlc_object_release( p_vout );
- vlc_object_release( p_vout );
+ vlc_object_release (list->p_values[i].p_object);
+ vlc_object_release (list->p_values[i].p_object);
}
stats_TimersDumpAll( p_libvlc );
More information about the vlc-devel
mailing list