player: cosmetics: make code more compact

This commit is contained in:
wm4 2014-08-16 17:07:26 +02:00
parent a4cfab7ee0
commit 14c1d864d9
1 changed files with 2 additions and 5 deletions

View File

@ -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);
}