1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 17:12:36 +00:00
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 core: redo how codecs are mapped, remove codecs.conf 2013-02-10 17:25:56 +01:00
demux_cue.c core: move contents to mpvcore (2/2) 2013-08-06 22:52:31 +02:00
demux_edl.c demux: remove useless author/comment fields 2013-07-12 22:16:27 +02:00
demux_lavf.c demux: retrieve per-chapter metadata 2013-09-08 07:43:23 +02:00
demux_libass.c core: move contents to mpvcore (2/2) 2013-08-06 22:52:31 +02:00
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: workaround for -demuxer mpegts -correct-pts 2013-05-21 22:07:13 +02:00
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
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
ebml.c core: move contents to mpvcore (2/2) 2013-08-06 22:52:31 +02:00
ebml.h core: move contents to mpvcore (2/2) 2013-08-06 22:52:31 +02:00
matroska.h demux_mkv: support V_PRORES 2013-09-08 23:05:18 +02:00
mf.c core: move contents to mpvcore (2/2) 2013-08-06 22:52:31 +02:00
mf.h demux_mf: allow displaying single image files, various cleanups 2012-11-16 21:21:16 +01:00
ms_hdr.h ms_hdr: remove unused definitions 2013-07-10 02:00:47 +02:00
stheader.h core: add --deinterlace option, restore it with resume functionality 2013-09-13 21:32:28 +02:00