diff options
author | wm4 <wm4@nowhere> | 2014-08-14 23:59:35 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-08-14 23:59:35 +0200 |
commit | d5940fabcd6b477c72430c84e460975060807646 (patch) | |
tree | b8392948588c4e3e5d42c10537351697424659e4 /player | |
parent | 498644afafbcff1bf4f4bcdc1bbc8ef41aae9546 (diff) |
sub: add option to workaround broken mkv files
See additions to options.rst.
Diffstat (limited to 'player')
-rw-r--r-- | player/sub.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/player/sub.c b/player/sub.c index efd2f68464..7f01a17961 100644 --- a/player/sub.c +++ b/player/sub.c @@ -172,6 +172,8 @@ void update_subtitles(struct MPContext *mpctx) static void reinit_subdec(struct MPContext *mpctx, struct track *track, struct dec_sub *dec_sub) { + struct MPOpts *opts = mpctx->opts; + if (sub_is_initialized(dec_sub)) return; @@ -189,7 +191,7 @@ static void reinit_subdec(struct MPContext *mpctx, struct track *track, // Don't do this if the file has video/audio streams. Don't do it even // if it has only sub streams, because reading packets will change the // demuxer position. - if (!track->preloaded && track->is_external) { + if (!track->preloaded && track->is_external && !opts->sub_clear_on_seek) { demux_seek(track->demuxer, 0, SEEK_ABSOLUTE); track->preloaded = sub_read_all_packets(dec_sub, track->stream); } |