From eb66a3fe0795321e4008d5989cfc911a550ee666 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Fri, 23 Sep 2011 14:40:12 +0300 Subject: subreader.c: don't run FriBiDi code if using libass Libass has its own BiDi handling now, and preprocessing the subtitles with FriBiDi before passing them to libass breaks things. Disable our own FriBiDi code when libass rendering is used. This affects external subtitle files of other formats parsed with subreader.c and converted to ASS tracks. --- sub/subreader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sub/subreader.c b/sub/subreader.c index a1d2974af4..f694f57a7c 100644 --- a/sub/subreader.c +++ b/sub/subreader.c @@ -1558,7 +1558,10 @@ sub_data* sub_read_file(char *filename, float fps, struct MPOpts *opts) if ((sub!=ERR) && sub_utf8 == 2) sub=subcp_recode(sub); #endif #ifdef CONFIG_FRIBIDI - if (sub!=ERR) sub=sub_fribidi(sub,sub_utf8,0); + /* Libass has its own BiDi handling now, and running this before + * giving the subtitle to libass would only break things. */ + if (sub != ERR && !opts->ass_enabled) + sub = sub_fribidi(sub, sub_utf8, 0); #endif if ( sub == ERR ) { -- cgit v1.2.3