comparison src/audacious/ui_fileinfo.c @ 4529:6cf91e97c6d5

prevent dead lock
author Tomasz Mon <desowin@gmail.com>
date Wed, 30 Apr 2008 23:53:20 +0200
parents 0fe46317167f
children bc30700268d3
comparison
equal deleted inserted replaced
4528:2638175099e0 4529:6cf91e97c6d5
947 ui_fileinfo_show_entry(Playlist *playlist, PlaylistEntry *entry) 947 ui_fileinfo_show_entry(Playlist *playlist, PlaylistEntry *entry)
948 { 948 {
949 gchar *path = g_strdup(entry->filename); 949 gchar *path = g_strdup(entry->filename);
950 Tuple *tuple = entry->tuple; 950 Tuple *tuple = entry->tuple;
951 951
952 PLAYLIST_UNLOCK(playlist);
953
954 /* plugin is capable of updating tags. we need to bypass tuple cache. --eugene */ 952 /* plugin is capable of updating tags. we need to bypass tuple cache. --eugene */
955 /* maybe code cleanup required... */ 953 /* maybe code cleanup required... */
956 if (entry != NULL && 954 if (entry != NULL &&
957 entry->decoder != NULL && 955 entry->decoder != NULL &&
958 entry->decoder->update_song_tuple != NULL && 956 entry->decoder->update_song_tuple != NULL &&
1003 1001
1004 PLAYLIST_LOCK(playlist); 1002 PLAYLIST_LOCK(playlist);
1005 1003
1006 if ((node = g_list_nth(playlist->entries, pos))) 1004 if ((node = g_list_nth(playlist->entries, pos)))
1007 ui_fileinfo_show_entry(playlist, node->data); 1005 ui_fileinfo_show_entry(playlist, node->data);
1006
1007 PLAYLIST_UNLOCK(playlist);
1008 } 1008 }
1009 1009
1010 void 1010 void
1011 ui_fileinfo_show_current(Playlist *playlist) 1011 ui_fileinfo_show_current(Playlist *playlist)
1012 { 1012 {
1013 PLAYLIST_LOCK(playlist); 1013 PLAYLIST_LOCK(playlist);
1014 1014
1015 if (playlist->entries && playlist->position) 1015 if (playlist->entries && playlist->position)
1016 ui_fileinfo_show_entry(playlist, playlist->position); 1016 ui_fileinfo_show_entry(playlist, playlist->position);
1017 } 1017
1018 PLAYLIST_UNLOCK(playlist);
1019 }