diff options
author | Max Kellermann <max@duempel.org> | 2014-08-27 19:06:50 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-27 19:06:50 +0200 |
commit | f8d0ebe92f9ceb4be761078395ef51a15fb0ae47 (patch) | |
tree | a3271e3e35f74ab8645b3380af8fd025bbbf2085 | |
parent | ba6ba7d4be6f43c5b6ba65a106fbf2ed40a53b45 (diff) | |
download | mpd-f8d0ebe92f9ceb4be761078395ef51a15fb0ae47.tar.gz mpd-f8d0ebe92f9ceb4be761078395ef51a15fb0ae47.tar.xz mpd-f8d0ebe92f9ceb4be761078395ef51a15fb0ae47.zip |
PlayerThread: check if total_time is valid before using it
-rw-r--r-- | src/PlayerThread.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx index 1850a1711..00f8007a1 100644 --- a/src/PlayerThread.cxx +++ b/src/PlayerThread.cxx @@ -562,7 +562,7 @@ Player::SeekDecoder() /* send the SEEK command */ double where = pc.seek_where; - if (where > pc.total_time) + if (pc.total_time > 0 && where > pc.total_time) where = pc.total_time - 0.1; if (where < 0.0) where = 0.0; |