]> git.sesse.net Git - vlc/commitdiff
Split Freetype destruction from the main destruction
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 26 Sep 2013 19:27:50 +0000 (21:27 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 15 Dec 2013 13:31:20 +0000 (14:31 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/text_renderer/freetype.c

index 28f09ebab370332b376b281a9b7a26f358301e6a..437c29efac07dfa5686dacbe0631e6cf0bd315c0 100644 (file)
@@ -2402,6 +2402,18 @@ error:
     return VLC_EGENERIC;
 }
 
+
+static void Destroy_FT( vlc_object_t *p_this )
+{
+    filter_t *p_filter = (filter_t *)p_this;
+    filter_sys_t *p_sys = p_filter->p_sys;
+
+    if( p_sys->p_stroker )
+        FT_Stroker_Done( p_sys->p_stroker );
+    FT_Done_Face( p_sys->p_face );
+    FT_Done_FreeType( p_sys->p_library );
+}
+
 /*****************************************************************************
  * Destroy: destroy Clone video thread output method
  *****************************************************************************
@@ -2428,13 +2440,6 @@ static void Destroy( vlc_object_t *p_this )
     free( p_sys->psz_win_fonts_path );
 #endif
 
-    /* FcFini asserts calling the subfunction FcCacheFini()
-     * even if no other library functions have been made since FcInit(),
-     * so don't call it. */
-
-    if( p_sys->p_stroker )
-        FT_Stroker_Done( p_sys->p_stroker );
-    FT_Done_Face( p_sys->p_face );
-    FT_Done_FreeType( p_sys->p_library );
+    Destroy_FT( p_this );
     free( p_sys );
 }