input: avoids double mutex locking
authorRafaël Carré <funman@videolan.org>
Sat, 20 Oct 2007 23:20:43 +0000 (23:20 +0000)
committerRafaël Carré <funman@videolan.org>
Sat, 20 Oct 2007 23:20:43 +0000 (23:20 +0000)
src/input/input.c

index 9742b71..4e42410 100644 (file)
@@ -2558,8 +2558,6 @@ static void InputUpdateMeta( input_thread_t *p_input, vlc_meta_t *p_meta )
             input_ExtractAttachmentAndCacheArt( p_input );
     }
     free( psz_arturl );
-    input_item_SetPreparsed( p_item, VLC_TRUE );
 
     /* A bit ugly */
     p_meta = NULL;
@@ -2570,6 +2568,8 @@ static void InputUpdateMeta( input_thread_t *p_input, vlc_meta_t *p_meta )
     }
     vlc_mutex_unlock( &p_item->lock );
 
+    input_item_SetPreparsed( p_item, VLC_TRUE );
+
     if( i_arturl_event == VLC_TRUE )
     {
         vlc_event_t event;