1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-19 14:26:57 +00:00

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.
This commit is contained in:
Uoti Urpala 2009-12-18 19:18:19 +02:00
parent efcc9ad712
commit 8ee23f418f

View File

@ -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;
}