Commit Diff


commit - 0fe5e233e3def36c9af6a9c9008ff0fdcbfe15ec
commit + 25cb72fb3fbbe1886355dcff1cec5950150bc40c
blob - 8dcc0a356a2af59e38690e72bbf3256b173a97ea
blob + 231822107acb6b1cb3786804c8fc1e5bbcf79020
--- player.c
+++ player.c
@@ -196,7 +196,7 @@ player_sendeof(void)
 	imsg_flush(ibuf);
 }
 
-void
+int
 player_playnext(void)
 {
 	int fd = nextfd;
@@ -216,8 +216,10 @@ player_playnext(void)
 	else {
 		log_warnx("unknown file type for %s", nextpath);
 		player_senderr();
-		return;
+		return 0;
 	}
+
+	return 1;
 }
 
 int
@@ -290,9 +292,7 @@ player(int debug, int verbose)
 		while (nextfd == -1)
 			player_dispatch();
 
-		player_playnext();
-
-		if (!got_stop)
+		if (player_playnext() && !got_stop)
 			player_sendeof();
 		else
 			got_stop = 0;