summaryrefslogtreecommitdiffstats
path: root/player/sub.c
diff options
context:
space:
mode:
authorrcombs <rcombs@rcombs.me>2020-12-23 00:40:32 -0600
committerLeo Izen <leo.izen@gmail.com>2021-06-23 16:10:29 -0400
commit11423acf3048445620bf1e8987b3f7aa04887cf0 (patch)
treea5f1d977eee7d02856eabf77776faf10b24b6c2b /player/sub.c
parentcb56c2f888dbe86dbc38839c32684d54ea93c63e (diff)
downloadmpv-11423acf3048445620bf1e8987b3f7aa04887cf0.tar.bz2
mpv-11423acf3048445620bf1e8987b3f7aa04887cf0.tar.xz
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.
Diffstat (limited to 'player/sub.c')
-rw-r--r--player/sub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/sub.c b/player/sub.c
index ae2a85ac1c..49bae790de 100644
--- a/player/sub.c
+++ b/player/sub.c
@@ -114,7 +114,8 @@ static bool update_subtitle(struct MPContext *mpctx, double video_pts,
// Handle displaying subtitles on VO with no video being played. This is
// quite different, because normally subtitles are redrawn on new video
// frames, using the video frames' timestamps.
- if (mpctx->video_out && mpctx->video_status == STATUS_EOF) {
+ if (mpctx->video_out && mpctx->video_status == STATUS_EOF &&
+ mpctx->opts->subs_rend->sub_past_video_end) {
if (osd_get_force_video_pts(mpctx->osd) != video_pts) {
osd_set_force_video_pts(mpctx->osd, video_pts);
osd_query_and_reset_want_redraw(mpctx->osd);