From a77a171b7ff436cb63b13321427a259a2a8c8fc7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 30 Oct 2014 22:46:25 +0100 Subject: demux_lavf: mark as seekable if protocol supports seeking by time Basically, this will mark the demuxer as seekable with rtmp* and mmsh protocols. These protocols have network-level time seeking, and whether you can seek on the byte level does not matter. Until now, seeking was typically only enabled because of the cache, and a (nonsensical) warning was shown accordingly. It still could happen that the server doesn't actually support thse requests (or simply rejects them), so this is somewhat imperfect. --- demux/demux_lavf.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'demux') diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 553e43aea0..d1158619b7 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -729,6 +729,8 @@ static int demux_open_lavf(demuxer_t *demuxer, enum demux_check check) priv->pb->read_seek = mp_read_seek; priv->pb->seekable = demuxer->seekable ? AVIO_SEEKABLE_NORMAL : 0; avfc->pb = priv->pb; + if (stream_control(demuxer->stream, STREAM_CTRL_HAS_AVSEEK, NULL) > 0) + demuxer->seekable = true; } if (matches_avinputformat_name(priv, "rtsp")) { -- cgit v1.2.3