diff options
author | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-08-24 15:36:20 +0000 |
---|---|---|
committer | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-08-24 15:36:20 +0000 |
commit | e7bd9034b9cdd90981906e331b20c122d41744ad (patch) | |
tree | 1e6a2898ecdb64db3e9da0b61776e511e60c9974 /libass | |
parent | 18187165506761918e8e2dc31c0b2ab3b5e0a463 (diff) | |
download | libass-e7bd9034b9cdd90981906e331b20c122d41744ad.tar.bz2 libass-e7bd9034b9cdd90981906e331b20c122d41744ad.tar.xz |
Simplify vf_ass initialization.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19523 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass')
-rw-r--r-- | libass/ass_render.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index 327f886b..8f961e61 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -178,20 +178,20 @@ ass_instance_t* ass_init(void) if (family) free(family); if (!fc_priv) - return 0; + goto ass_init_exit; error = FT_Init_FreeType( &ft ); if ( error ) { mp_msg(MSGT_GLOBAL, MSGL_FATAL, "FT_Init_FreeType failed\n"); fontconfig_done(fc_priv); - return 0; + goto ass_init_exit; } priv = calloc(1, sizeof(ass_instance_t)); if (!priv) { FT_Done_FreeType(ft); fontconfig_done(fc_priv); - return 0; + goto ass_init_exit; } priv->library = ft; priv->fontconfig_priv = fc_priv; @@ -202,6 +202,10 @@ ass_instance_t* ass_init(void) text_info.glyphs = calloc(MAX_GLYPHS, sizeof(glyph_info_t)); +ass_init_exit: + if (priv) mp_msg(MSGT_GLOBAL, MSGL_INFO, "[ass] Init\n"); + else mp_msg(MSGT_GLOBAL, MSGL_ERR, "[ass] Init failed\n"); + return priv; } |