mirror of https://github.com/mpv-player/mpv
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:
parent
0383070588
commit
eb66a3fe07
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue