# HG changeset patch # User William Pitcock # Date 1192321862 18000 # Node ID da090f448c880993bb341981a419e2e185735906 # Parent 40d138de84602fe7fc62ff301d050845e15ad4b2 fix for livelock reported by joker... diff -r 40d138de8460 -r da090f448c88 src/audacious/playlist.c --- a/src/audacious/playlist.c Sat Oct 13 19:12:09 2007 -0500 +++ b/src/audacious/playlist.c Sat Oct 13 19:31:02 2007 -0500 @@ -2627,7 +2627,9 @@ Restart. */ node = playlist->entries; } - else if ((entry->tuple != NULL || entry->title != NULL) && entry->length != -1) { + else if ((entry->tuple != NULL || entry->title != NULL) && + tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 && + tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1) { update_playlistwin = TRUE; break; } @@ -2671,10 +2673,12 @@ node = g_list_nth(playlist->entries, playlistwin_get_toprow()); } - else if ((entry->tuple != NULL || entry->title != NULL) && entry->length != -1) { + else if ((entry->tuple != NULL || entry->title != NULL) && + tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 && + tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1) { update_playlistwin = TRUE; - // no need for break here since this iteration is very short. - } + break; + } } } // on_demand else if (cfg.get_info_on_demand &&