summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-03-24 02:31:29 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-03-24 02:31:29 +0000
commit35e90f1556475ee205dee6c253b788ab073133c0 (patch)
treec566ed05c11f4da49b1282534d28c6ce6db2648a /libvo
parentb7e160dbe9a0a60ee2e6124e71f0a8653d1c7432 (diff)
downloadmpv-35e90f1556475ee205dee6c253b788ab073133c0.tar.bz2
mpv-35e90f1556475ee205dee6c253b788ab073133c0.tar.xz
The fix in mp_msg.c avoids a core dump when iconv_open() fails, the other
just makes it possible to compile if USE_ICONV is undefined. Patch by Bjorn Sandell (biorn _At_ chalmers _Dot_ se). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17932 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/font_load_ft.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c
index d29ad899a7..2acdce38f5 100644
--- a/libvo/font_load_ft.c
+++ b/libvo/font_load_ft.c
@@ -18,7 +18,9 @@
#include <math.h>
#include <string.h>
+#ifdef USE_ICONV
#include <iconv.h>
+#endif
#include <ft2build.h>
#include FT_FREETYPE_H
@@ -731,7 +733,7 @@ int generate_tables(font_desc_t *desc, double thickness, double radius)
return 0;
}
-
+#ifdef USE_ICONV
/* decode from 'encoding' to unicode */
static FT_ULong decode_char(iconv_t *cd, char c) {
FT_ULong o;
@@ -830,6 +832,7 @@ static int prepare_charset_unicode(FT_Face face, FT_ULong *charset, FT_ULong *ch
return i;
}
+#endif
static font_desc_t* init_font_desc(void)
{
@@ -1015,6 +1018,7 @@ font_desc_t* read_font_desc_ft(char *fname, int movie_width, int movie_height)
}
desc->face_cnt++;
+#ifdef USE_ICONV
if (unicode) {
charset_size = prepare_charset_unicode(face, my_charset, my_charcodes);
} else {
@@ -1030,6 +1034,9 @@ font_desc_t* read_font_desc_ft(char *fname, int movie_width, int movie_height)
free_font_desc(desc);
return NULL;
}
+#else
+ return NULL;
+#endif
// fprintf(stderr, "fg: prepare t = %lf\n", GetTimer()-t);