From 6d15c491b063736d6915e74a9134d1cabde9a663 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 29 Jul 2014 01:00:54 +0200 Subject: player: remove a pointless field --- player/playloop.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'player/playloop.c') 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; -- cgit v1.2.3