mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
player: show subtitles on VO if --force-window is used
If a VO is created, but no video is playing (i.e. --force-window is used), then until now no subtitles were shown. This is because VO subtitle display normally depends on video frame timing. If there are no video frames, there can be no subtitles. Change this and add some code to handle this situation specifically. Set a subtitle PTS manually and request VO redrawing manually, which gets the subtitles rendered somehow. This is kind of shaky. The subtitles are essentially sampled at arbitrary times (such as when new audio data is decoded and pushed to the AO, or on user interaction). To make a it slightly more consistent, force a completely arbitrary minimum FPS of 10. Other solutions (such as creating fake video) would be more intrusive or would require VO-level API changes. Fixes #3684.
This commit is contained in:
@@ -67,6 +67,7 @@ struct osd_state {
|
||||
struct osd_object *objs[MAX_OSD_PARTS];
|
||||
|
||||
bool render_subs_in_filter;
|
||||
double force_video_pts;
|
||||
|
||||
bool want_redraw;
|
||||
bool want_redraw_notification;
|
||||
|
||||
Reference in New Issue
Block a user