summaryrefslogtreecommitdiffstats
path: root/player/playloop.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-29 01:00:54 +0200
committerwm4 <wm4@nowhere>2014-07-29 01:00:54 +0200
commit6d15c491b063736d6915e74a9134d1cabde9a663 (patch)
treee3b8a97aaf3dd0b8c9718432ec3044be9891e149 /player/playloop.c
parent25ceb3289d1b031ab55b9f6fa57a4dfb0fa687fa (diff)
downloadmpv-6d15c491b063736d6915e74a9134d1cabde9a663.tar.bz2
mpv-6d15c491b063736d6915e74a9134d1cabde9a663.tar.xz
player: remove a pointless field
Diffstat (limited to 'player/playloop.c')
-rw-r--r--player/playloop.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/player/playloop.c b/player/playloop.c
index 3cd0e78129..42ebab302c 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -226,9 +226,10 @@ static int mp_seek(MPContext *mpctx, struct seek_params seek,
seek.type = MPSEEK_ABSOLUTE;
}
}
+ int direction = 0;
if (seek.type == MPSEEK_RELATIVE) {
seek.type = MPSEEK_ABSOLUTE;
- seek.direction = seek.amount > 0 ? 1 : -1;
+ direction = seek.amount > 0 ? 1 : -1;
seek.amount += get_current_time(mpctx);
}
hr_seek &= seek.type == MPSEEK_ABSOLUTE; // otherwise, no target PTS known
@@ -265,9 +266,9 @@ static int mp_seek(MPContext *mpctx, struct seek_params seek,
demuxer_style |= SEEK_ABSOLUTE;
break;
}
- if (hr_seek || seek.direction < 0)
+ if (hr_seek || direction < 0)
demuxer_style |= SEEK_BACKWARD;
- else if (seek.direction > 0)
+ else if (direction > 0)
demuxer_style |= SEEK_FORWARD;
if (hr_seek || opts->mkv_subtitle_preroll)
demuxer_style |= SEEK_SUBPREROLL;