Mercurial > mplayer.hg
changeset 20502:81a92ae66d78
Move ass_library initialization code to ass_mp.c.
author | eugeni |
---|---|
date | Sun, 29 Oct 2006 15:26:13 +0000 |
parents | 30df9a64618a |
children | 5cbf1c33a668 |
files | libass/ass_mp.c libass/ass_mp.h mplayer.c |
diffstat | 3 files changed, 13 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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; +}
--- 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
--- 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