diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-09-23 14:40:12 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-09-23 14:43:53 +0300 |
commit | eb66a3fe0795321e4008d5989cfc911a550ee666 (patch) | |
tree | 703c7dac67492f78cd9ace8006dba1a221f3d46c /sub | |
parent | 0383070588aff3313de70d90478fd607c6c442ff (diff) | |
download | mpv-eb66a3fe0795321e4008d5989cfc911a550ee666.tar.bz2 mpv-eb66a3fe0795321e4008d5989cfc911a550ee666.tar.xz |
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.
Diffstat (limited to 'sub')
-rw-r--r-- | sub/subreader.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 ) { |