summaryrefslogtreecommitdiffstats
path: root/demux/demux_lavf.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-06 19:24:25 +0200
committerwm4 <wm4@nowhere>2016-08-06 19:28:41 +0200
commit78bcbe289e3c35696e193be16a547095c77c628a (patch)
tree2f70e890aaedb2709db013985c9b9de5a9281ed4 /demux/demux_lavf.c
parent91a3bda6f52c0dd49b2cfba93186cc02e1d56bc5 (diff)
downloadmpv-78bcbe289e3c35696e193be16a547095c77c628a.tar.bz2
mpv-78bcbe289e3c35696e193be16a547095c77c628a.tar.xz
demux: make refresh seek handling more generic
Remove the explicit whitelisting of formats for refresh seeks. Instead, check whether the packet position is somewhat reliable during demuxing. If there are packets without position, or the packet position is not monotonically increasing, then do not use them for refresh seeks. This does not make sure of some requirements, such as deterministic seeks. If that happens, mpv will mess up a bit on stream switching. Also, add another method that uses DTS to identify packets, and prefer it to the packet position method. Even if there's a demuxer which randomizes packet positions, it hardly can do that with DTS. The DTS method is not always available either, though. Some formats do not have a DTS, and others are not always strictly monotonic (possibly due to libavformat codec parsing and timestamp determination issues).
Diffstat (limited to 'demux/demux_lavf.c')
-rw-r--r--demux/demux_lavf.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index e2221135f4..a38fb60435 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -865,7 +865,6 @@ static int demux_open_lavf(demuxer_t *demuxer, enum demux_check check)
demuxer->start_time = priv->avfc->start_time == AV_NOPTS_VALUE ?
0 : (double)priv->avfc->start_time / AV_TIME_BASE;
- demuxer->allow_refresh_seeks = matches_avinputformat_name(priv, "mp4");
demuxer->fully_read = priv->format_hack.fully_read;
return 0;