[vlc-commits] commit: Libass: simplify and do not call ass_set_fonts_dir ( Jean-Baptiste Kempf )

git at videolan.org git at videolan.org
Tue Apr 27 00:56:50 CEST 2010


vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Apr 27 00:43:54 2010 +0200| [f27861f1d7316101a9312f85d1c10e2d5cbd29f7] | committer: Jean-Baptiste Kempf 

Libass: simplify and do not call ass_set_fonts_dir

This should continue to fix the fontconfig caching bugs
(cherry picked from commit 1402fd523e1e8b50b8ec669019f7f607d5f6594b)

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

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

 modules/codec/libass.c |   31 -------------------------------
 1 files changed, 0 insertions(+), 31 deletions(-)

diff --git a/modules/codec/libass.c b/modules/codec/libass.c
index ae86e99..ae36eac 100644
--- a/modules/codec/libass.c
+++ b/modules/codec/libass.c
@@ -698,42 +698,11 @@ static ass_handle_t *AssHandleHold( decoder_t *p_dec )
     }
     free( pp_attachments );
 
-    char *psz_font_dir = NULL;
-
-
 #if defined(WIN32)
     dialog_progress_bar_t *p_dialog = dialog_ProgressCreate( p_dec,
         _("Building font cache"),
         _( "Please wait while your font cache is rebuilt.\n"
         "This should take less than a minute." ), NULL );
-    /* This makes Windows build of VLC hang */
-    const UINT uPath = GetSystemWindowsDirectoryW( NULL, 0 );
-    if( uPath > 0 )
-    {
-        wchar_t *psw_path = calloc( uPath + 1, sizeof(wchar_t) );
-        if( psw_path )
-        {
-            if( GetSystemWindowsDirectoryW( psw_path, uPath + 1 ) > 0 )
-            {
-                char *psz_tmp = FromWide( psw_path );
-                if( psz_tmp &&
-                    asprintf( &psz_font_dir, "%s\\Fonts", psz_tmp ) < 0 )
-                    psz_font_dir = NULL;
-                free( psz_tmp );
-            }
-            free( psw_path );
-        }
-    }
-#endif
-    if( !psz_font_dir )
-        psz_font_dir = config_GetUserDir( VLC_CACHE_DIR );
-
-    if( !psz_font_dir )
-        goto error;
-    msg_Dbg( p_dec, "Setting libass fontdir: %s", psz_font_dir );
-    ass_set_fonts_dir( p_library, psz_font_dir );
-    free( psz_font_dir );
-#ifdef WIN32
     if( p_dialog )
         dialog_ProgressSet( p_dialog, NULL, 0.1 );
 #endif



More information about the vlc-commits mailing list