[vlc-commits] Split Freetype destruction from the main destruction

Jean-Baptiste Kempf git at videolan.org
Sun Dec 15 14:42:08 CET 2013


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Sep 26 21:27:50 2013 +0200| [f20218fa5641f67ed542a153a57283284ed41f80] | committer: Jean-Baptiste Kempf

Split Freetype destruction from the main destruction

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f20218fa5641f67ed542a153a57283284ed41f80
---

 modules/text_renderer/freetype.c |   21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
index 28f09eb..437c29e 100644
--- a/modules/text_renderer/freetype.c
+++ b/modules/text_renderer/freetype.c
@@ -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 );
 }



More information about the vlc-commits mailing list