mirror of https://github.com/mpv-player/mpv
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.)
This commit is contained in:
parent
9c286d7472
commit
aeb3df0e2c
|
@ -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")) {
|
||||
|
|
Loading…
Reference in New Issue