From aeb3df0e2c7f8e86f7b550f876dc24ae1c4686f6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 8 Jun 2016 11:49:56 +0200 Subject: 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.) --- demux/demux_lavf.c | 1 + 1 file changed, 1 insertion(+) 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")) { -- cgit v1.2.3