From 14c1d864d9320f5fb2ec7bcecc738b506c73aa69 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 16 Aug 2014 17:07:26 +0200 Subject: [PATCH] player: cosmetics: make code more compact --- player/playloop.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/player/playloop.c b/player/playloop.c index e3d1ada323..2ea6c62665 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -234,12 +234,9 @@ static int mp_seek(MPContext *mpctx, struct seek_params seek, for (int t = 0; t < mpctx->num_tracks; t++) { struct track *track = mpctx->tracks[t]; if (track->selected && track->is_external && track->demuxer) { - double main_new_pos; - if (seek.type == MPSEEK_ABSOLUTE) { - main_new_pos = seek.amount; - } else { + double main_new_pos = seek.amount; + if (seek.type != MPSEEK_ABSOLUTE) main_new_pos = get_main_demux_pts(mpctx); - } main_new_pos -= get_track_video_offset(mpctx, track); demux_seek(track->demuxer, main_new_pos, SEEK_ABSOLUTE); }