mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
sub: by default, don't render timestamps after video EOF
This fixes a long-standing apparent issue where mpv would display the last frame with no subtitles at EOF. This is caused by sub rendering switching from video timestamps to audio timestamps when the video ends, and audio streams often running past the timestamp of the last video frame. However, authoring tools (most notably Aegisub) don't tend to provide easy ways to add meaningful subtitles after the end of the video, so this is rarely actually useful.
This commit is contained in:
@@ -275,6 +275,7 @@ const struct m_sub_options mp_subtitle_sub_opts = {
|
||||
{"sub", OPT_SUBSTRUCT(sub_style, sub_style_conf)},
|
||||
{"sub-clear-on-seek", OPT_FLAG(sub_clear_on_seek)},
|
||||
{"teletext-page", OPT_INT(teletext_page), M_RANGE(1, 999)},
|
||||
{"sub-past-video-end", OPT_FLAG(sub_past_video_end)},
|
||||
{0}
|
||||
},
|
||||
.size = sizeof(OPT_BASE_STRUCT),
|
||||
|
||||
@@ -107,6 +107,7 @@ struct mp_subtitle_opts {
|
||||
int ass_justify;
|
||||
int sub_clear_on_seek;
|
||||
int teletext_page;
|
||||
int sub_past_video_end;
|
||||
};
|
||||
|
||||
struct mp_sub_filter_opts {
|
||||
|
||||
Reference in New Issue
Block a user