summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/cfg-mplayer.h1
-rw-r--r--core/mplayer.c2
-rw-r--r--core/options.h1
3 files changed, 4 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
diff --git a/core/mplayer.c b/core/mplayer.c
index 21af9ca57a..3833d0a7da 100644
--- a/core/mplayer.c
+++ b/core/mplayer.c
@@ -2821,6 +2821,8 @@ static int seek(MPContext *mpctx, struct seek_params seek,
demuxer_style |= SEEK_BACKWARD;
else if (seek.direction > 0)
demuxer_style |= SEEK_FORWARD;
+ if (hr_seek || opts->mkv_subtitle_preroll)
+ demuxer_style |= SEEK_SUBPREROLL;
if (hr_seek)
demuxer_amount -= opts->hr_seek_demuxer_offset;
diff --git a/core/options.h b/core/options.h
index 0f1df17ba5..716ad5c357 100644
--- a/core/options.h
+++ b/core/options.h
@@ -140,6 +140,7 @@ typedef struct MPOpts {
char *audio_demuxer_name;
char *sub_demuxer_name;
int extension_parsing;
+ int mkv_subtitle_preroll;
struct image_writer_opts *screenshot_image_opts;
char *screenshot_template;