[vlc-devel] commit: media_instance: Forgotten lock(). (Pierre d'Herbemont )

git version control git at videolan.org
Sat Mar 29 02:23:03 CET 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sat Mar 29 00:25:55 2008 +0100| [50db778e449c617dae134c4421cda1e4b9a36944]

media_instance: Forgotten lock().

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=50db778e449c617dae134c4421cda1e4b9a36944
---

 src/control/media_instance.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/control/media_instance.c b/src/control/media_instance.c
index 73c9b7e..7e9e3b3 100644
--- a/src/control/media_instance.c
+++ b/src/control/media_instance.c
@@ -628,7 +628,11 @@ void libvlc_media_instance_stop( libvlc_media_instance_t *p_mi,
                                  libvlc_exception_t *p_e )
 {
     if( p_mi->b_own_its_input_thread )
+    {
+        vlc_mutex_lock( &p_mi->object_lock );
         release_input_thread( p_mi ); /* This will stop the input thread */
+        vlc_mutex_unlock( &p_mi->object_lock );
+    }
     else
     {
         input_thread_t * p_input_thread = libvlc_get_input_thread( p_mi, p_e );




More information about the vlc-devel mailing list