mpv/demux
wm4 88f10ec84f player: fix instant subtitle refresh on track switches
When switching a subtitle track, the subtitle wasn't necessarily
updated, especially when playback was paused.

Some awfully subtle and complex interactions here.

First off (and not so subtle), the subtitle decoder will read packets
only on explicit update_subtitles() calls, which, if video is active, is
called only when a new video frame is shown. (A simply video frame
redraw doesn't trigger this.) So call it explicitly. But only if
playback is "initialized", i.e. not when it does initial track selection
and decoder init, during which no packets should be read.

The second issue is that the demuxer thread simply will not read new
packets just because a track was switched, especially if playback is
paused. That's fine, but if a refresh seek is to be done, it really
should do this. So if there's either 1. a refresh seek requested, or 2.
a refresh seek ongoing, then read more packets.

Note that it's entirely possible that we overflow the packet queue with
this in unpredicated weird corner cases, but the queue limit will still
be enforced, so this shouldn't make the situation worse.
2016-09-24 19:57:19 +02:00
..
codec_tags.c
codec_tags.h
cue.c
cue.h
demux.c player: fix instant subtitle refresh on track switches 2016-09-24 19:57:19 +02:00
demux.h demux: do not access global options 2016-09-06 20:09:56 +02:00
demux_cue.c
demux_disc.c player: improve instant track switching 2016-08-06 15:47:04 +02:00
demux_edl.c stream, demux, config: remove some dead/unneeded option-related code 2016-09-09 17:54:57 +02:00
demux_lavf.c demux: do not access global options 2016-09-06 20:09:56 +02:00
demux_libarchive.c libarchive: unify entry iteration between stream/demux layers 2016-07-18 12:44:56 +02:00
demux_mf.c demux: do not access global options 2016-09-06 20:09:56 +02:00
demux_mkv.c demux: do not access global options 2016-09-06 20:09:56 +02:00
demux_mkv_timeline.c demux: do not access global options 2016-09-06 20:09:56 +02:00
demux_null.c
demux_playlist.c
demux_rar.c
demux_raw.c demux: do not access global options 2016-09-06 20:09:56 +02:00
demux_timeline.c demux_timeline: enable refresh seeks in some situations 2016-08-07 13:53:34 +02:00
demux_tv.c tv: remove weird option parsing stuff 2016-09-09 17:54:35 +02:00
ebml.c
ebml.h
matroska.h
packet.c
packet.h
stheader.h demux: change fps field to double 2016-08-19 15:00:58 +02:00
timeline.c
timeline.h