[vlc-devel] commit: Added a missing lock around attachments. (Laurent Aimar )

git version control git at videolan.org
Mon Mar 23 20:57:47 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Mar 23 20:34:50 2009 +0100| [bd3dbe03d72a7e634f241ef04b0fcaa0a483c913] | committer: Laurent Aimar 

Added a missing lock around attachments.

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

 src/input/input.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index f5b78a7..47172cc 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1341,12 +1341,14 @@ static void End( input_thread_t * p_input )
 #undef CL_CO
     }
 
+    vlc_mutex_lock( &p_input->p->p_item->lock );
     if( p_input->p->i_attachment > 0 )
     {
         for( i = 0; i < p_input->p->i_attachment; i++ )
             vlc_input_attachment_Delete( p_input->p->attachment[i] );
         TAB_CLEAN( p_input->p->i_attachment, p_input->p->attachment );
     }
+    vlc_mutex_unlock( &p_input->p->p_item->lock );
 
     /* */
     input_resource_RequestSout( p_input->p->p_resource,




More information about the vlc-devel mailing list