[MPlayer-cvslog] r36503 - trunk/sub/font_load_ft.c

reimar subversion at mplayerhq.hu
Sat Nov 9 09:46:01 CET 2013


Author: reimar
Date: Sat Nov  9 09:46:01 2013
New Revision: 36503

Log:
font_load_ft: small simplifications.

Modified:
   trunk/sub/font_load_ft.c

Modified: trunk/sub/font_load_ft.c
==============================================================================
--- trunk/sub/font_load_ft.c	Fri Nov  8 22:06:40 2013	(r36502)
+++ trunk/sub/font_load_ft.c	Sat Nov  9 09:46:01 2013	(r36503)
@@ -840,9 +840,7 @@ static int prepare_charset_unicode(FT_Fa
 
 static font_desc_t* init_font_desc(void)
 {
-    font_desc_t *desc;
-
-    desc = calloc(1, sizeof(*desc));
+    font_desc_t *desc = calloc(1, sizeof(*desc));
     if(!desc) return NULL;
 
     desc->dynamic = 1;
@@ -990,12 +988,7 @@ font_desc_t* read_font_desc_ft(const cha
     if (subtitle_font_ppem > 128) subtitle_font_ppem = 128;
     if (osd_font_ppem > 128) osd_font_ppem = 128;
 
-    if ((subtitle_font_encoding == NULL)
-	|| (strcasecmp(subtitle_font_encoding, "unicode") == 0)) {
-	unicode = 1;
-    } else {
-	unicode = 0;
-    }
+    unicode = !subtitle_font_encoding || strcasecmp(subtitle_font_encoding, "unicode") == 0;
 
     desc = init_font_desc();
     if(!desc) goto err_out;


More information about the MPlayer-cvslog mailing list