summaryrefslogtreecommitdiffstats
path: root/player/sub.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-30 23:01:55 +0200
committerwm4 <wm4@nowhere>2014-07-30 23:29:00 +0200
commit8f2e9f1d613f686a834446c73465f0ca41156db3 (patch)
treedffb9d92c1764b7c6b7bd829e919e68f1be10bb1 /player/sub.c
parentc38013bffb130fbd60c57348a15ad1d6759c1806 (diff)
downloadmpv-8f2e9f1d613f686a834446c73465f0ca41156db3.tar.bz2
mpv-8f2e9f1d613f686a834446c73465f0ca41156db3.tar.xz
player: split seek_reset()
This also reduces some code duplication with other parts of the code. The changfe is mostly cosmetic, although there are also some subtle changes in behavior. At least one change is that the big desync message is now printed after every seek.
Diffstat (limited to 'player/sub.c')
-rw-r--r--player/sub.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/player/sub.c b/player/sub.c
index 2ee928794c..1a9fdcafe7 100644
--- a/player/sub.c
+++ b/player/sub.c
@@ -76,6 +76,12 @@ void reset_subtitles(struct MPContext *mpctx, int order)
osd_set_text(mpctx->osd, obj, NULL);
}
+void reset_subtitle_state(struct MPContext *mpctx)
+{
+ reset_subtitles(mpctx, 0);
+ reset_subtitles(mpctx, 1);
+}
+
static void update_subtitle(struct MPContext *mpctx, int order)
{
struct MPOpts *opts = mpctx->opts;