aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-27 19:06:50 +0200
committerMax Kellermann <max@duempel.org>2014-08-27 19:06:50 +0200
commitf8d0ebe92f9ceb4be761078395ef51a15fb0ae47 (patch)
treea3271e3e35f74ab8645b3380af8fd025bbbf2085 /src
parentba6ba7d4be6f43c5b6ba65a106fbf2ed40a53b45 (diff)
downloadmpd-f8d0ebe92f9ceb4be761078395ef51a15fb0ae47.tar.gz
mpd-f8d0ebe92f9ceb4be761078395ef51a15fb0ae47.tar.xz
mpd-f8d0ebe92f9ceb4be761078395ef51a15fb0ae47.zip
PlayerThread: check if total_time is valid before using it
Diffstat (limited to 'src')
-rw-r--r--src/PlayerThread.cxx2
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;