summaryrefslogtreecommitdiffstats
path: root/mpcommon.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-12-18 19:18:19 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-12-18 19:53:34 +0200
commit8ee23f418f1e8ea0310f01d4b48c73a693056d87 (patch)
tree94055a853f11629a6f0ab061b8c5eb9c73986ba7 /mpcommon.c
parentefcc9ad7120e01a17fc3659cb0229135b1cebb95 (diff)
downloadmpv-8ee23f418f1e8ea0310f01d4b48c73a693056d87.tar.bz2
mpv-8ee23f418f1e8ea0310f01d4b48c73a693056d87.tar.xz
subtitles: Fix double text with libass rendered plaintext subs
When using libass to render plaintext (non-SSA/ASS) subtitles the code in update_subtitles() still called set_osd_subtitle() in one case, causing the global vo_sub variable containing non-libass subtitles to be set. Under some circumstances this resulted in both a libass-rendered and non-libass-rendered version of the same subtitle appearing on screen. Fix by running the subtitle clearing code (which called set_osd_subtitle) only when libass is not used.
Diffstat (limited to 'mpcommon.c')
-rw-r--r--mpcommon.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mpcommon.c b/mpcommon.c
index 2401578d1c..456b6e9ee7 100644
--- a/mpcommon.c
+++ b/mpcommon.c
@@ -230,8 +230,9 @@ void update_subtitles(struct MPContext *mpctx, struct MPOpts *opts,
if (d_dvdsub->non_interleaved)
ds_get_next_pts(d_dvdsub);
}
- if (sub_clear_text(&subs, curpts))
- set_osd_subtitle(mpctx, &subs);
+ if (!opts->ass_enabled)
+ if (sub_clear_text(&subs, curpts))
+ set_osd_subtitle(mpctx, &subs);
}
current_module=NULL;
}