comparison src/audacious/playlist.c @ 3733:da090f448c88

fix for livelock reported by joker...
author William Pitcock <nenolod@atheme.org>
date Sat, 13 Oct 2007 19:31:02 -0500
parents d5309028af21
children b4fe7d2a0d0d
comparison
equal deleted inserted replaced
3732:40d138de8460 3733:da090f448c88
2625 if (g_list_index(playlist->entries, entry) == -1) 2625 if (g_list_index(playlist->entries, entry) == -1)
2626 /* Entry disappeared while we looked it up. 2626 /* Entry disappeared while we looked it up.
2627 Restart. */ 2627 Restart. */
2628 node = playlist->entries; 2628 node = playlist->entries;
2629 } 2629 }
2630 else if ((entry->tuple != NULL || entry->title != NULL) && entry->length != -1) { 2630 else if ((entry->tuple != NULL || entry->title != NULL) &&
2631 tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 &&
2632 tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1) {
2631 update_playlistwin = TRUE; 2633 update_playlistwin = TRUE;
2632 break; 2634 break;
2633 } 2635 }
2634 } 2636 }
2635 2637
2669 /* Entry disapeared while we 2671 /* Entry disapeared while we
2670 looked it up. Restart. */ 2672 looked it up. Restart. */
2671 node = g_list_nth(playlist->entries, 2673 node = g_list_nth(playlist->entries,
2672 playlistwin_get_toprow()); 2674 playlistwin_get_toprow());
2673 } 2675 }
2674 else if ((entry->tuple != NULL || entry->title != NULL) && entry->length != -1) { 2676 else if ((entry->tuple != NULL || entry->title != NULL) &&
2677 tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 &&
2678 tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1) {
2675 update_playlistwin = TRUE; 2679 update_playlistwin = TRUE;
2676 // no need for break here since this iteration is very short. 2680 break;
2677 } 2681 }
2678 } 2682 }
2679 } // on_demand 2683 } // on_demand
2680 else if (cfg.get_info_on_demand && 2684 else if (cfg.get_info_on_demand &&
2681 (!cfg.playlist_visible || cfg.playlist_shaded || !cfg.use_pl_metadata)) 2685 (!cfg.playlist_visible || cfg.playlist_shaded || !cfg.use_pl_metadata))
2682 { 2686 {