summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-03-25 17:27:02 +0100
committerwm4 <wm4@nowhere>2016-03-25 17:27:02 +0100
commitdafafc90dea5caebebb169a7a7cddac8377651f5 (patch)
treecc19070937d0f3dcda4ea46f703421ab5619fc5f
parentef625a78a4784318b72cd44e9703591811e942fc (diff)
downloadmpv-dafafc90dea5caebebb169a7a7cddac8377651f5.tar.bz2
mpv-dafafc90dea5caebebb169a7a7cddac8377651f5.tar.xz
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.)
-rw-r--r--demux/demux_timeline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux_timeline.c b/demux/demux_timeline.c
index 3c9748036d..af3389ba73 100644
--- a/demux/demux_timeline.c
+++ b/demux/demux_timeline.c
@@ -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);