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.
This commit is contained in:
Uoti Urpala 2011-09-23 14:40:12 +03:00
parent 0383070588
commit eb66a3fe07
1 changed files with 4 additions and 1 deletions

View File

@ -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 )
{