mirror of https://github.com/mpv-player/mpv
player: cosmetics: make code more compact
This commit is contained in:
parent
a4cfab7ee0
commit
14c1d864d9
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue