PlayerThread: check if total_time is valid before using it

This commit is contained in:
Max Kellermann 2014-08-27 19:06:50 +02:00
parent ba6ba7d4be
commit f8d0ebe92f

View File

@ -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;