summaryrefslogtreecommitdiffstats
path: root/core/cfg-mplayer.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-04 01:43:14 +0200
committerwm4 <wm4@nowhere>2013-04-04 14:45:29 +0200
commit75afa370b9aba90be73b8acc97eb9669bc0f2133 (patch)
treeddbf1ef6a0c9008e19bd48a20511327db6f0acb2 /core/cfg-mplayer.h
parentf36a5a88d0ac17e8fdc1885d2f3bf95e903d54e3 (diff)
downloadmpv-75afa370b9aba90be73b8acc97eb9669bc0f2133.tar.bz2
mpv-75afa370b9aba90be73b8acc97eb9669bc0f2133.tar.xz
demux_mkv: try to show current subtitle when seeking
Makes sure that seeking to a given time position shows the subtitle at that position. This can fail if the subtitle packet is not close enough to the seek target. Always enabled for hr-seeks, and can be manually enabled for normal seeks with --mkv-subtitle-preroll. This helps displaying subtitles correctly with ordered chapters. When switching ordered chapter segments, a seek is performed. If the subtitle is timed slightly before the start of the segment, it normally won't be demuxed. This is a problem with all seeks, but in this case normal playback is affected. Since switching segments always uses hr-seeks, the code added by this commit is always active in this situation. If no subtitles are selected or the subtitles come from an external file, the demuxer should behave exactly as before this commit.
Diffstat (limited to 'core/cfg-mplayer.h')
-rw-r--r--core/cfg-mplayer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h
index 4bdead1be1..a85f83ac36 100644
--- a/core/cfg-mplayer.h
+++ b/core/cfg-mplayer.h
@@ -391,6 +391,7 @@ const m_option_t common_opts[] = {
OPT_STRING("audio-demuxer", audio_demuxer_name, 0),
OPT_STRING("sub-demuxer", sub_demuxer_name, 0),
OPT_FLAG("extbased", extension_parsing, 0),
+ OPT_FLAG("mkv-subtitle-preroll", mkv_subtitle_preroll, 0),
{"mf", (void *) mfopts_conf, CONF_TYPE_SUBCONFIG, 0,0,0, NULL},
#ifdef CONFIG_RADIO