diff options
author | wm4 <wm4@nowhere> | 2013-09-16 00:20:19 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-09-16 00:46:14 +0200 |
commit | 4a3ceac2b5cbe784355caac4140e309139cbc242 (patch) | |
tree | f49ef1c8f006f9e9031bea6f90ad65c7cd0b44e9 /configure | |
parent | 4f400d2b855c63f9793dc5447d35c10f9be354bb (diff) | |
download | mpv-4a3ceac2b5cbe784355caac4140e309139cbc242.tar.bz2 mpv-4a3ceac2b5cbe784355caac4140e309139cbc242.tar.xz |
demux_mkv: don't add too many subtitle packets during seeking
In insane files with a very huge number of subtitle events, and if the
--demuxer-mkv-subtitle-preroll option is given, seeking can still
overflow the packet queue. Normally, the subtitle_preroll variable
specifies the maximum number of packets that can be added. But once this
number is reached, the normal seeking behavior is enabled, which will
add all subtitle packets with the right timestamps to the packet queue.
At this point the next video keyframe can still be quite far away, with
enough subtitle packets on the way to overflow the packet queue.
Fix this by always setting an upper limit of subtitle packets read
during seeking. This should provide additional robustness even if the
preroll option is not used.
This means that even with normal seeking, at most 500 subtitle packets
are demuxed. Packets after that are discarded.
One slightly questionable aspect of this commit is that subtitle_preroll
is never reset in audio-only mode, but that is probably ok.
Diffstat (limited to 'configure')
0 files changed, 0 insertions, 0 deletions