mpv/demux
Dudemanguy 9d9e986e06 demux: fix erroneous condition in lazy_stream_needs_wait
Yeah another try at this. So when inspecting lazy_stream_needs_wait, I
realized it had a curious !ds->reader_head condition. Actually, this is
what is messing everything up. This was originally added in
cf2b7a4997 for showing large negative sub
delay values correctly. It worked because the packet will eventually be
discarded during playback causing ds->reader_head not exist and thus the
next one will correctly be read ahead as needed.

But for the "switching subtitle tracks while paused" case, this is
actually bad. As the stream is read, eventually you'll find a packet and
set the reader_head. But it's not going to be the correct packet (unless
you're looking for the very first one), so you need to read more. This
won't happen because of the !ds->reader_head check and unlike the sub
delay case, nothing will eventually discard that packet since playback
isn't occuring. So read_packet exits earlier than it should and isn't
tried again, so the subtitle that you want won't show since the
returned packet has the wrong pts. All that needs to be done here is to
delete this one condition. There's already checks in place to make sure
that it's not read past the desired timestamp and for the sub delay case
(the only other time this logic is used), it makes no difference since
you won't read past the specified pts in the first place.
2023-10-01 14:06:45 +00:00
..
cache.c demux: prepend some cache options with demuxer 2023-09-18 17:13:15 +00:00
cache.h
codec_tags.c demux/codec_tags: support more WAVEFORMATEXTENSIBLE tags 2022-11-01 09:52:27 -04:00
codec_tags.h
cue.c
cue.h
demux.c demux: fix erroneous condition in lazy_stream_needs_wait 2023-10-01 14:06:45 +00:00
demux.h Revert "demux: improve stream selection state" 2023-09-30 09:02:57 -05:00
demux_cue.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
demux_disc.c Revert "demux: improve stream selection state" 2023-09-30 09:02:57 -05:00
demux_edl.c edl: add a way to add tags 2021-05-11 22:18:40 +02:00
demux_lavf.c win32/pthread: define _POSIX_TIMERS to notify they are not supported 2023-09-29 20:48:58 +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 Revert "demux: improve stream selection state" 2023-09-30 09:02:57 -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
stheader.h demux: add crop to mp_codec_params 2023-09-17 16:48:42 +00:00
timeline.c
timeline.h various: add missing include in header flles 2023-09-21 14:40:11 +00:00