aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/PlayerCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-29 12:43:47 +0200
committerMax Kellermann <max@duempel.org>2014-08-29 13:20:58 +0200
commit22899686346088a536be11e0c6a68700d4a237a4 (patch)
tree4e3843a55dd85bd34ac8740561c36506d03cd564 /src/command/PlayerCommands.cxx
parentca252804c6bbba163fe00d660f47ca4856e4874e (diff)
downloadmpd-22899686346088a536be11e0c6a68700d4a237a4.tar.gz
mpd-22899686346088a536be11e0c6a68700d4a237a4.tar.xz
mpd-22899686346088a536be11e0c6a68700d4a237a4.zip
PlayerControl: use SignedSongTime for the song duration
Diffstat (limited to '')
-rw-r--r--src/command/PlayerCommands.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx
index 7b033368a..f4b4674a0 100644
--- a/src/command/PlayerCommands.cxx
+++ b/src/command/PlayerCommands.cxx
@@ -176,7 +176,9 @@ handle_status(Client &client,
"elapsed: %1.3f\n"
COMMAND_STATUS_BITRATE ": %u\n",
(int)(player_status.elapsed_time + 0.5),
- (int)(player_status.total_time + 0.5),
+ player_status.total_time.IsNegative()
+ ? 0u
+ : unsigned(player_status.total_time.RoundS()),
player_status.elapsed_time,
player_status.bit_rate);