1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-21 22:30:22 +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:
Uoti Urpala 2010-05-16 06:07:51 +03:00
parent a47ef5fed6
commit c67d3dfcfc

View File

@ -1195,7 +1195,11 @@ static subtitle* sub_fribidi (subtitle *sub, int sub_utf8, int from)
break; break;
} }
len = fribidi_charset_to_unicode (char_set_num, ip, len, logical); 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; FriBidiParType base = fribidi_flip_commas?FRIBIDI_TYPE_ON:FRIBIDI_TYPE_L;
#endif
log2vis = fribidi_log2vis (logical, len, &base, log2vis = fribidi_log2vis (logical, len, &base,
/* output */ /* output */
visual, NULL, NULL, NULL); visual, NULL, NULL, NULL);