diff options
author | wm4 <wm4@nowhere> | 2017-10-23 19:05:39 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-10-23 19:05:39 +0200 |
commit | dbd22f43be49059c0ec801389103d5d16229bf26 (patch) | |
tree | 078acbfe7af703120b5e38a6bad285c4182dceec /demux/demux_timeline.c | |
parent | 26b46950a101612073d83e782fbe3c1a5fd03aca (diff) | |
download | mpv-dbd22f43be49059c0ec801389103d5d16229bf26.tar.bz2 mpv-dbd22f43be49059c0ec801389103d5d16229bf26.tar.xz |
demux: drop redundant SEEK_BACKWARD flag
Seems like most code dealing with this was for setting it in redundant
cases. Now SEEK_BACKWARD is redundant, and SEEK_FORWARD is the odd one
out.
Also fix that SEEK_FORWARD was not correctly unset in try_seek_cache().
In demux_mkv_seek(), make the arbitrary decision that a video stream is
not required for the subtitle prefetch logic to be active. We might want
subtitles with long duration even with audio only playback, or if the
file is used as external subtitle.
Diffstat (limited to 'demux/demux_timeline.c')
-rw-r--r-- | demux/demux_timeline.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/demux/demux_timeline.c b/demux/demux_timeline.c index d7a5c36d70..6b375261f4 100644 --- a/demux/demux_timeline.c +++ b/demux/demux_timeline.c @@ -179,8 +179,8 @@ static void switch_segment(struct demuxer *demuxer, struct segment *new, { struct priv *p = demuxer->priv; - if (!(flags & (SEEK_FORWARD | SEEK_BACKWARD))) - flags |= SEEK_BACKWARD | SEEK_HR; + if (!(flags & SEEK_FORWARD)) + flags |= SEEK_HR; MP_VERBOSE(demuxer, "switch to segment %d\n", new->index); @@ -209,7 +209,7 @@ static void d_seek(struct demuxer *demuxer, double seek_pts, int flags) double pts = seek_pts * ((flags & SEEK_FACTOR) ? p->duration : 1); - flags &= SEEK_FORWARD | SEEK_BACKWARD | SEEK_HR; + flags &= SEEK_FORWARD | SEEK_HR; struct segment *new = p->segments[p->num_segments - 1]; for (int n = 0; n < p->num_segments; n++) { |