summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
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.h
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.h')
-rw-r--r--demux/demux.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/demux/demux.h b/demux/demux.h
index 8c07fe8933..8470047f9d 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -178,12 +178,6 @@ typedef struct demuxer {
double start_time;
// File format allows PTS resets (even if the current file is without)
bool ts_resets_possible;
- // Enable fast track switching hacks. This requires from the demuxer:
- // - seeking is somewhat reliable; packet contents must not change
- // - packet position (demux_packet.pos) is set, not negative, unique, and
- // monotonically increasing
- // - seeking leaves packet positions invariant
- bool allow_refresh_seeks;
// The file data was fully read, and there is no need to keep the stream
// open, keep the cache active, or to run the demuxer thread. Generating
// packets is not slow either (unlike e.g. libavdevice pseudo-demuxers).