summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-05-16 06:07:51 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-05-16 06:11:16 +0300
commitc67d3dfcfc9ae088288af6fab4f4d9d83e9851e0 (patch)
treedb9b92d093ff9d6d58793b9fd39b784a4353515d
parenta47ef5fed65ede96ad411fdebfa910feb6a3bb4e (diff)
downloadmpv-c67d3dfcfc9ae088288af6fab4f4d9d83e9851e0.tar.bz2
mpv-c67d3dfcfc9ae088288af6fab4f4d9d83e9851e0.tar.xz
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.
-rw-r--r--subreader.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/subreader.c b/subreader.c
index e4ba939742..394cc414cf 100644
--- a/subreader.c
+++ b/subreader.c
@@ -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);