summaryrefslogtreecommitdiff
blob: 53e9f9b1af5671d575261d4ac2cf27c224a88515 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- trunk/audacious/main.c	2006/09/08 05:26:54	2239
+++ trunk/audacious/main.c	2006/09/10 01:04:36	2255
@@ -1127,12 +1127,15 @@
 	has_x11_connection = TRUE;
 
 	if (cfg.resume_playback_on_startup) {
-		if (cfg.resume_playback_on_startup_time != -1) {
+		if (cfg.resume_playback_on_startup_time != -1 && playlist_get_length() > 0) {
+			int i;
 			while (gtk_events_pending()) gtk_main_iteration();
 			bmp_playback_initiate();
-			g_usleep(10000);	/* XXX: musepack and others need this! */
-			while (!ip_data.playing)
+			for (i = 0; i < 8; i++) {
 				g_usleep(10000);
+				if (!ip_data.playing)
+					break;
+			}
 			bmp_playback_seek(cfg.resume_playback_on_startup_time /
 					  1000);
 		}