mpv/demux
Dudemanguy f40bbfec4f demux: improve stream selection state
This replaces the previous commit and makes more sense. The internal
demux marked tracks as eager depending on their type and for subtitles
it would always lazily read them unless there happened to be no
available av stream. However, we want the sub stream to be eager if the
player is paused. The existing subtitle is still preserved on the
screen, but if the user changes tracks that's when the problem occurs.
So to handle this case, propagate the mpctx->paused down to the stream
selection logic. This modifies both demuxer_refresh_track and
demuxer_select_track to take that boolean value. A few other parts of
the player use this, but we can just assume false there (no change in
behavior from before) since they should never be related to subtitles.
The core player code is aware of its own state naturally, and can always
pass the appropriate value so go ahead and do so. When we change the
pause state, a refresh seek is done on all existing subtitle tracks to
make sure their eager state is the appropriate value (i.e. so it's not
still set to eager after a pause and a track switch). Slightly invasive
change, but it works with the existing logic instead of going around it
so ultimately it should be a better approach. We can additionally remove
the old force boolean from sub_read_packets since it is no longer
needed.
2023-09-27 22:38:13 -05:00
..
cache.c demux: prepend some cache options with demuxer 2023-09-18 17:13:15 +00:00
cache.h demux: add a on-disk cache 2019-09-19 20:37:05 +02:00
codec_tags.c demux/codec_tags: support more WAVEFORMATEXTENSIBLE tags 2022-11-01 09:52:27 -04:00
codec_tags.h
cue.c cue: tolerate NBSP as whitespace 2020-02-03 19:13:44 +01:00
cue.h
demux.c demux: improve stream selection state 2023-09-27 22:38:13 -05:00
demux.h demux: improve stream selection state 2023-09-27 22:38:13 -05:00
demux_cue.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
demux_disc.c demux: improve stream selection state 2023-09-27 22:38:13 -05:00
demux_edl.c edl: add a way to add tags 2021-05-11 22:18:40 +02:00
demux_lavf.c demuxer: remove several mp_read_option_raw calls 2023-09-22 14:20:38 +00:00
demux_libarchive.c options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
demux_mf.c demuxer: remove several mp_read_option_raw calls 2023-09-22 14:20:38 +00:00
demux_mkv.c demuxer: remove several mp_read_option_raw calls 2023-09-22 14:20:38 +00:00
demux_mkv_timeline.c demux_mkv: warn against some other aspects of mismatching codec data 2020-08-16 01:00:29 +02:00
demux_null.c
demux_playlist.c demux_playlist: add --directory-mode=auto 2023-09-21 14:57:11 +00:00
demux_raw.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
demux_timeline.c demux: improve stream selection state 2023-09-27 22:38:13 -05:00
ebml.c build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
ebml.h build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
matroska.h
packet.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
packet.h demux: add a on-disk cache 2019-09-19 20:37:05 +02:00
stheader.h demux: add crop to mp_codec_params 2023-09-17 16:48:42 +00:00
timeline.c stream, demux: redo origin policy thing 2019-12-20 13:00:39 +01:00
timeline.h various: add missing include in header flles 2023-09-21 14:40:11 +00:00