HACK: prefetch subtitles on track switch a bit more

To get overlapping shit etc.
This commit is contained in:
wm4 2018-06-30 17:55:21 +02:00
parent 99afa8d51b
commit bf05697653
1 changed files with 4 additions and 1 deletions

View File

@ -362,8 +362,11 @@ void reselect_demux_stream(struct MPContext *mpctx, struct track *track)
if (!track->stream)
return;
double pts = get_current_time(mpctx);
if (pts != MP_NOPTS_VALUE)
if (pts != MP_NOPTS_VALUE) {
pts += get_track_seek_offset(mpctx, track);
if (track->type == STREAM_SUB)
pts -= 10.0;
}
demuxer_select_track(track->demuxer, track->stream, pts, track->selected);
if (track == mpctx->seek_slave)
mpctx->seek_slave = NULL;