]> git.sesse.net Git - vlc/commitdiff
Do not hold change_lock while loading the vout module.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 17 Oct 2009 18:14:10 +0000 (20:14 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 20 Oct 2009 17:29:08 +0000 (19:29 +0200)
It allows the module to trigger some vout callback while loading.

src/video_output/video_output.c

index 566126bdbd8da1bc67739847c0f058cd6d1ea464..c5aa29ba109cbf0abb73248d5727af4aef38ec2e 100644 (file)
@@ -979,9 +979,6 @@ static void* RunThread( void *p_this )
     bool            b_picture_interlaced_last = false;
     mtime_t         i_picture_interlaced_last_date;
 
-
-    vlc_mutex_lock( &p_vout->change_lock );
-
     /*
      * Initialize thread
      */
@@ -989,6 +986,9 @@ static void* RunThread( void *p_this )
                                     p_vout->p->psz_module_type,
                                     p_vout->p->psz_module_name,
                                     !strcmp(p_vout->p->psz_module_type, "video filter") );
+
+    vlc_mutex_lock( &p_vout->change_lock );
+
     if( p_vout->p_module )
         p_vout->b_error = InitThread( p_vout );
     else