summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-09-19 23:10:53 +0200
committerwm4 <wm4@nowhere>2014-09-20 00:45:11 +0200
commit65e816b3fe0dae5aa21e4211ef0192b762636e2d (patch)
treecb76a51c17c424c479d9db424642ee6fe0a1b5ef
parent116d1d0dfabfcc04de4c6c3171c003b0319d0fa1 (diff)
downloadmpv-65e816b3fe0dae5aa21e4211ef0192b762636e2d.tar.bz2
mpv-65e816b3fe0dae5aa21e4211ef0192b762636e2d.tar.xz
player: make code more obvious
Or at least I think so.
-rw-r--r--player/playloop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/playloop.c b/player/playloop.c
index af3db40022..647a864513 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -192,9 +192,9 @@ static int mp_seek(MPContext *mpctx, struct seek_params seek,
if (seek.type == MPSEEK_FACTOR || seek.amount < 0 ||
(seek.type == MPSEEK_ABSOLUTE && seek.amount < mpctx->last_chapter_pts))
mpctx->last_chapter_seek = -2;
- if (seek.type == MPSEEK_FACTOR) {
+ if (seek.type == MPSEEK_FACTOR && !mpctx->demuxer->ts_resets_possible) {
double len = get_time_length(mpctx);
- if (len > 0 && !mpctx->demuxer->ts_resets_possible) {
+ if (len > 0) {
seek.amount = seek.amount * len + get_start_time(mpctx);
seek.type = MPSEEK_ABSOLUTE;
}