mpv/sub
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
..
ass_mp.c sub: add --sub-fonts-dir and --osd-fonts-dir options 2023-03-01 02:09:46 +00:00
ass_mp.h sub/ass_mp: filters/f_lavfi: forward declare mp_log 2023-09-21 14:40:11 +00:00
dec_sub.c demux: improve stream selection state 2023-09-27 22:38:13 -05:00
dec_sub.h demux: improve stream selection state 2023-09-27 22:38:13 -05:00
draw_bmp.c draw_bmp: fix overflowing coordinates in mark_rcs 2023-07-30 20:06:20 +02:00
draw_bmp.h test: integrate unittests with meson 2023-03-02 15:45:27 +00:00
filter_jsre.c sub: jsre filter: abort init early on empty filter list 2022-06-09 14:38:24 +03:00
filter_regex.c sub: sub-filter-regex and jsre: support ass-to-plaintext 2021-08-05 21:32:22 +03:00
filter_sdh.c various: fix various typos in the code base 2023-03-28 19:29:44 +00:00
img_convert.c
img_convert.h
lavc_conv.c sub/lavc_conv: properly fill avctx with codecpar values at init 2023-03-14 23:59:47 +02:00
meson.build build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
osd.c sub/osd: signal osd_changed on resize 2023-08-25 09:34:53 +02:00
osd.h sub: add --sub-fonts-dir and --osd-fonts-dir options 2023-03-01 02:09:46 +00:00
osd_font.otf
osd_libass.c build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
osd_state.h sub/osd: use atomic for osd_state.force_video_pts 2022-04-02 21:41:58 +03:00
sd.h player: remove auto choice from sub-forced-only 2023-08-29 16:39:00 +00:00
sd_ass.c sd_ass: use directive instead of writing magic constants 2023-09-21 14:40:11 +00:00
sd_lavc.c sd_lavc: fix subtitle presentation time 2023-09-11 01:58:07 +00:00