[vlc-devel] [Patch] Symbian Merge__Changes to /src/bin

Rémi Denis-Courmont remi at remlab.net
Thu Jul 29 09:10:23 CEST 2010


diff --git a/bin/vlc.c b/bin/vlc.c
index c8a05ba..81ca99e 100644
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -44,6 +44,18 @@
 #include <string.h>
 #endif
 
+#ifdef SYMBIAN
+#include <vlc_common.h>
+static vlc_mutex_t exit_lock = VLC_STATIC_MUTEX;
+static vlc_cond_t  exiting = VLC_STATIC_COND;
+void symbian_libvlc_Wait( libvlc_int_t *p_libvlc );

You probably don't need that line ^^.
You could simply mark the function as 'static'.

+void symbian_libvlc_Wait( libvlc_int_t *p_libvlc )
+{
+    vlc_mutex_lock( &exit_lock );
+    vlc_cond_wait( &exiting, &exit_lock );
+    vlc_mutex_unlock( &exit_lock );
+}
+#endif

Using a semaphore would be a lot simpler or more correct:
	sem_wait( &exit_sem );
here and:
	sem_post( &exit_sem );
in vlc_kill(). Normally, a condition variable must always have some external 
state, whereas a semaphore has its own internal state.
 

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis



More information about the vlc-devel mailing list