summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-16 00:20:19 +0200
committerwm4 <wm4@nowhere>2013-09-20 21:20:33 +0200
commit7b8d3602880869b16ae1fa036b76102d34aec923 (patch)
tree5f6fbde36f9ab5798ea97c5d0efd9f7a1a677620 /Makefile
parent33940727953f5a301d78c35324802eadcabb4fbd (diff)
downloadmpv-7b8d3602880869b16ae1fa036b76102d34aec923.tar.bz2
mpv-7b8d3602880869b16ae1fa036b76102d34aec923.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 'Makefile')
0 files changed, 0 insertions, 0 deletions