mirror of https://github.com/mpv-player/mpv
demux_timeline: request subtitle prefetching on crossing segments
SEEK_HR is interpreted by demux_mkv.c, and enables subtitle preroll by prefetching additional subtitle pakcets which might overlap with the seek destination. This should make the case work when segment boundaries fall into the middle of subtitle events. This still usually leaves a flicker of at least 1 frame on start, because dec_sub.c does not ensure that enough subtitles are read before rendering after a segment switch. (Probably a WONTFIX.)
This commit is contained in:
parent
ef625a78a4
commit
dafafc90de
|
@ -96,7 +96,7 @@ static void switch_segment(struct demuxer *demuxer, struct segment *new,
|
|||
bool new_segment = p->current != new;
|
||||
|
||||
if (!(flags & (SEEK_FORWARD | SEEK_BACKWARD)))
|
||||
flags |= SEEK_BACKWARD;
|
||||
flags |= SEEK_BACKWARD | SEEK_HR;
|
||||
|
||||
MP_VERBOSE(demuxer, "switch to segment %d\n", new->index);
|
||||
|
||||
|
|
Loading…
Reference in New Issue