diff options
author | wm4 <wm4@nowhere> | 2015-02-14 14:29:21 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-02-14 14:29:21 +0100 |
commit | de0f3747ee13c300f9b073a6a3da984318aed40a (patch) | |
tree | d13084574304af46cb925886440822e07f34c8ed /demux/demux.h | |
parent | bf46f4c99714d2df105c3c004aa96680b4dda749 (diff) | |
download | mpv-de0f3747ee13c300f9b073a6a3da984318aed40a.tar.bz2 mpv-de0f3747ee13c300f9b073a6a3da984318aed40a.tar.xz |
demux: fix dropped subtitle packets with the new stream switching
If the previous subtitle packet is too far back, and the refresh seek
won't pick it up, and the packet never comes again. As a consequence,
the refresh mode was never stopped on the subtitle stream, which caused
all packets to be discarded.
Fix by assuming the file position is monotonically increasing; then it
will resume even if a packet _after_ the intended resume point is
returned. This introduces a new requirement on how the demuxer behaves.
(I'm not sure if mp4 actually satisfies this requirement in all cases.)
Fixes a regression introduced by commit f9f2e1cc.
Diffstat (limited to 'demux/demux.h')
-rw-r--r-- | demux/demux.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/demux/demux.h b/demux/demux.h index c580a22b18..acab2db2ba 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -195,7 +195,8 @@ typedef struct demuxer { bool rel_seeks; // 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, and unique + // - packet position (demux_packet.pos) is set, not negative, unique, and + // monotonically increasing // - seeking leaves packet positions invariant bool allow_refresh_seeks; |