# HG changeset patch # User eugeni # Date 1162135573 0 # Node ID 81a92ae66d78c9740f6db92057c2cf2501e014a8 # Parent 30df9a64618a6e7ec3bb864f03e7569389cebefa Move ass_library initialization code to ass_mp.c. diff -r 30df9a64618a -r 81a92ae66d78 libass/ass_mp.c --- a/libass/ass_mp.c Sun Oct 29 15:03:30 2006 +0000 +++ b/libass/ass_mp.c Sun Oct 29 15:26:13 2006 +0000 @@ -229,3 +229,14 @@ free(path); free(family); } + +ass_library_t* ass_init() { + ass_library_t* priv; + char* path = get_path("fonts"); + priv = ass_library_init(); + ass_set_fonts_dir(priv, path); + ass_set_extract_fonts(priv, extract_embedded_fonts); + ass_set_style_overrides(priv, ass_force_style_list); + free(path); + return priv; +} diff -r 30df9a64618a -r 81a92ae66d78 libass/ass_mp.h --- a/libass/ass_mp.h Sun Oct 29 15:03:30 2006 +0000 +++ b/libass/ass_mp.h Sun Oct 29 15:26:13 2006 +0000 @@ -41,6 +41,7 @@ ass_track_t* ass_read_subdata(ass_library_t* library, sub_data* subdata, double fps); void ass_configure(ass_renderer_t* priv, int w, int h); +ass_library_t* ass_init(); #endif diff -r 30df9a64618a -r 81a92ae66d78 mplayer.c --- a/mplayer.c Sun Oct 29 15:03:30 2006 +0000 +++ b/mplayer.c Sun Oct 29 15:26:13 2006 +0000 @@ -3108,14 +3108,7 @@ vo_init_osd(); #ifdef USE_ASS -{ - char* path = get_path("fonts"); - ass_library = ass_library_init(); - ass_set_fonts_dir(ass_library, path); - ass_set_extract_fonts(ass_library, extract_embedded_fonts); - ass_set_style_overrides(ass_library, ass_force_style_list); - free(path); -} + ass_library = ass_init(); #endif #ifdef HAVE_RTC