summaryrefslogtreecommitdiffstats
path: root/player/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/misc.c')
-rw-r--r--player/misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/misc.c b/player/misc.c
index 6ddbc31f52..4fbef24d8e 100644
--- a/player/misc.c
+++ b/player/misc.c
@@ -65,12 +65,12 @@ double rel_time_to_abs(struct MPContext *mpctx, struct m_rel_time t)
if (t.pos >= 0) {
return start + t.pos;
} else {
- if (length != 0)
+ if (length >= 0)
return MPMAX(start + length + t.pos, 0.0);
}
break;
case REL_TIME_PERCENT:
- if (length != 0)
+ if (length >= 0)
return start + length * (t.pos / 100.0);
break;
case REL_TIME_CHAPTER: