mpv/player
wm4 05b2cd08dc sub: make preloading more robust
Subtitles can be preloaded, which means they're fully read and copied
into ASS_Track. This in turn is mainly for the sake of being able to do
subtitle seeking (when it comes down to it, subtitle seeking is the
cause for most trouble here).

Commit a714f8e92 broke preloaded subtitles which have events with
unknown duration, such as some MicroDVD samples. The event list gets
cleared on every seek, so the property of being preloaded obviously gets
lost.

Fix this by moving most of the preloading logic to dec_sub.c. If the
subtitle list gets cleared, they are not considered preloaded anymore,
and the logic for demuxed subtitles is used.

As another minor thing, preloadeding subtitles did neither disable the
demux stream, nor did it discard packets. Thus you could get queue
overflows in theory (harmless, but annoying). Fix this by explicitly
discarding packets in preloaded mode.

In summary, now the only difference between preloaded and normal
demuxing are:
1. a seek is issued, and all packets are read on start
2. during playback, discard the packets instead of feeding them to the
   subtitle decoder

This is still petty annoying. It would be nice if maintaining the
subtitle index (and maybe a subtitle packet cache for instant subtitle
presentation when seeking back) could be maintained in the demuxer
instead. Half of all file formats with interleaved subtitles have
this anyway (mp4, mkv muxed with newer mkvmerge).
2016-03-06 15:17:59 +01:00
..
lua osc: add always-on mode and unify visibility mode (always/never/auto) 2016-02-27 22:19:30 +01:00
audio.c player: minor simplification 2016-02-27 20:03:15 +01:00
client.c client API: handle double->int64 conversion correctly 2016-02-13 13:07:53 +01:00
client.h global: add client API pointer to library handle 2016-01-15 22:54:08 +01:00
command.c command: fix property notification for cache-buffering-state 2016-03-02 13:57:30 +01:00
command.h video: always re-probe auto deint filter on filter reconfig 2015-07-21 21:54:15 +02:00
configfiles.c mpv_talloc.h: rename from talloc.h 2016-01-11 21:05:55 +01:00
core.h sub: make preloading more robust 2016-03-06 15:17:59 +01:00
external_files.c player: fix previous commit 2015-12-25 13:40:06 +01:00
external_files.h player: rename and move find_subfiles.c 2015-09-20 18:05:06 +02:00
lavfi.c lavfi: dump the filter graph 2016-02-12 20:28:07 +01:00
lavfi.h player: add complex filter graph support 2016-02-05 23:19:56 +01:00
loadfile.c demux: remove relative seeking 2016-02-28 19:28:34 +01:00
lua.c Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
main.c options: set fs=yes by default on RPI, and change RPI defaults handling 2016-02-05 18:05:38 +01:00
misc.c player: simplify error_on_track() 2016-02-05 23:17:27 +01:00
osd.c player: remove old timeline/ordered chapters support 2016-02-15 21:03:51 +01:00
playloop.c player: simplify mp_seek() 2016-02-28 20:01:29 +01:00
screenshot.c Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
screenshot.h Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
scripting.c Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
sub.c sub: make preloading more robust 2016-03-06 15:17:59 +01:00
video.c player: minor simplification 2016-02-27 20:03:15 +01:00