Fix input deadlocks in macosx gui
authorRafaël Carré <funman@videolan.org>
Sat, 18 Aug 2007 20:23:58 +0000 (20:23 +0000)
committerRafaël Carré <funman@videolan.org>
Sat, 18 Aug 2007 20:23:58 +0000 (20:23 +0000)
Doesn't fix input memleaks (playlist.m:204-214)

modules/gui/macosx/playlistinfo.m

index 6c927be..d777f87 100644 (file)
             [NSString stringWithUTF8String:p_item->p_input->psz_uri]];
     }
 
+    vlc_mutex_unlock( &p_item->p_input->lock );
+
     /* fill the other fields */
     [self setMeta: input_item_GetTitle( p_item->p_input )      forLabel: o_title_txt];
     [self setMeta: input_item_GetArtist( p_item->p_input )     forLabel: o_author_txt];
     [self setMeta: input_item_GetLanguage( p_item->p_input )   forLabel: o_language_txt];
     [self setMeta: input_item_GetDate( p_item->p_input )       forLabel: o_date_txt];
 
-    vlc_mutex_unlock( &p_item->p_input->lock );
-
     /* reload the advanced table */
     [[VLCInfoTreeItem rootItem] refresh];
     [o_outline_view reloadData];
 
         p_item->p_input->psz_uri = strdup( [[o_uri_txt stringValue] UTF8String] );
         p_item->p_input->psz_name = strdup( [[o_title_txt stringValue] UTF8String] );
-        input_item_SetArtist( p_item->p_input, [[o_author_txt stringValue] UTF8String] );
         vlc_mutex_unlock( &p_item->p_input->lock );
+        input_item_SetArtist( p_item->p_input, [[o_author_txt stringValue] UTF8String] );
 
         val.b_bool = VLC_TRUE;
         var_Set( p_playlist, "intf-change", val );