summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-06-08 11:49:56 +0200
committerwm4 <wm4@nowhere>2016-06-08 12:02:06 +0200
commitaeb3df0e2c7f8e86f7b550f876dc24ae1c4686f6 (patch)
treed75bbdc1ad1b3e2c406710af3cfe6e65c78187d8
parent9c286d747287eba71c194e7cb063fdc314d488a1 (diff)
downloadmpv-aeb3df0e2c7f8e86f7b550f876dc24ae1c4686f6.tar.bz2
mpv-aeb3df0e2c7f8e86f7b550f876dc24ae1c4686f6.tar.xz
demux_lavf: assume fully read files (subtitles) are always seekable
Since the libavformat API is crap, we have to apply tons of heuristics to check whether seeking will work. (No, checking it at seek time isn't going to work either, because if a seek fails, the demuxer will be in an undefined state. Because the libavformat API is crap.)
-rw-r--r--demux/demux_lavf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index ea0c15ec6a..a6f51dc5f3 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -795,6 +795,7 @@ static int demux_open_lavf(demuxer_t *demuxer, enum demux_check check)
avfc->pb = priv->pb;
if (stream_control(priv->stream, STREAM_CTRL_HAS_AVSEEK, NULL) > 0)
demuxer->seekable = true;
+ demuxer->seekable |= priv->format_hack.fully_read;
}
if (matches_avinputformat_name(priv, "rtsp")) {