mpv/demux
wm4 4a3ceac2b5 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.
2013-09-16 00:46:14 +02:00
..
codec_tags.c demux_mkv: support V_PRORES 2013-09-08 23:05:18 +02:00
codec_tags.h
demux.c demux: keep title chapter tag in uppercase 2013-09-08 23:07:02 +02:00
demux.h demux: retrieve per-chapter metadata 2013-09-08 07:43:23 +02:00
demux_cue.c
demux_edl.c
demux_lavf.c demux: retrieve per-chapter metadata 2013-09-08 07:43:23 +02:00
demux_libass.c
demux_mf.c demux: remove unused audio_delay parameter from demux_seek() 2013-08-22 19:14:26 +02:00
demux_mkv.c demux_mkv: don't add too many subtitle packets during seeking 2013-09-16 00:46:14 +02:00
demux_mng.c demux: remove unused audio_delay parameter from demux_seek() 2013-08-22 19:14:26 +02:00
demux_packet.h
demux_playlist.c demux_playlist: add mov RTSPtext tag parser 2013-09-14 15:58:10 +02:00
demux_raw.c demux: remove unused audio_delay parameter from demux_seek() 2013-08-22 19:14:26 +02:00
demux_subreader.c demux: remove unused audio_delay parameter from demux_seek() 2013-08-22 19:14:26 +02:00
ebml.c
ebml.h
matroska.h demux_mkv: support V_PRORES 2013-09-08 23:05:18 +02:00
mf.c
mf.h
ms_hdr.h
stheader.h core: add --deinterlace option, restore it with resume functionality 2013-09-13 21:32:28 +02:00