mirror of
https://github.com/mpv-player/mpv
synced 2024-12-21 06:14:32 +00:00
subreader.c: allow compilation with old FriBiDi 0.10
After fixing the type of the third parameter given to fribidi_log2vis the code didn't compile with old FriBiDi 0.10 any more. Seems that the parameter type has changed in FriBiDi and the type expected by current versions didn't exist in older ones at all. Fix compilation with old FriBiDi by adding an #if based on FRIBIDI_INTERFACE_VERSION.
This commit is contained in:
parent
a47ef5fed6
commit
c67d3dfcfc
@ -1195,7 +1195,11 @@ static subtitle* sub_fribidi (subtitle *sub, int sub_utf8, int from)
|
||||
break;
|
||||
}
|
||||
len = fribidi_charset_to_unicode (char_set_num, ip, len, logical);
|
||||
#if FRIBIDI_INTERFACE_VERSION < 3
|
||||
FriBidiCharType base = fribidi_flip_commas?FRIBIDI_TYPE_ON:FRIBIDI_TYPE_L;
|
||||
#else
|
||||
FriBidiParType base = fribidi_flip_commas?FRIBIDI_TYPE_ON:FRIBIDI_TYPE_L;
|
||||
#endif
|
||||
log2vis = fribidi_log2vis (logical, len, &base,
|
||||
/* output */
|
||||
visual, NULL, NULL, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user