Update libass to r29169 of MPlayer.

Originally committed to SVN as r2776.
This commit is contained in:
Amar Takhar 2009-04-11 07:42:48 +00:00
parent ff1a4fb8fc
commit 00339fefd0
3 changed files with 12 additions and 7 deletions

View File

@ -1128,6 +1128,7 @@ long long ass_step_sub(ass_track_t* track, long long now, int movement) {
ass_track_t* ass_new_track(ass_library_t* library) {
ass_track_t* track = calloc(1, sizeof(ass_track_t));
track->library = library;
track->ScaledBorderAndShadow = 1;
track->parser_priv = calloc(1, sizeof(parser_priv_t));
return track;
}

View File

@ -165,11 +165,13 @@ static char* _select_font(fc_instance_t* priv, const char* family, int treat_fam
goto error;
#if (FC_VERSION >= 20297)
// Remove all extra family names from original pattern.
// After this, FcFontRenderPrepare will select the most relevant family
// name in case there are more than one of them.
for (; family_cnt > 1; --family_cnt)
FcPatternRemove(pat, FC_FAMILY, family_cnt - 1);
if (!treat_family_as_pattern) {
// Remove all extra family names from original pattern.
// After this, FcFontRenderPrepare will select the most relevant family
// name in case there are more than one of them.
for (; family_cnt > 1; --family_cnt)
FcPatternRemove(pat, FC_FAMILY, family_cnt - 1);
}
#endif
rpat = FcFontRenderPrepare(priv->config, pat, fset->fonts[curf]);
@ -422,7 +424,6 @@ fc_instance_t* fontconfig_init(ass_library_t* library, FT_Library ftlibrary, con
#endif
int i;
if (!fc) {
mp_msg(MSGT_ASS, MSGL_WARN,
MSGTR_LIBASS_FontconfigDisabledDefaultFontWillBeUsed);
@ -446,7 +447,6 @@ fc_instance_t* fontconfig_init(ass_library_t* library, FT_Library ftlibrary, con
priv->config = FcConfigGetCurrent();
if (!priv->config) {
#endif
mp_msg(MSGT_ASS, MSGL_FATAL, MSGTR_LIBASS_FcInitLoadConfigAndFontsFailed);
goto exit;
}

View File

@ -455,6 +455,7 @@ static void render_overlap(ass_image_t** last_tail, ass_image_t** tail, bitmap_h
cur_top = top-by;
// Query cache
memset(&hk, 0, sizeof(hk));
memcpy(&hk.a, last_hash, sizeof(*last_hash));
memcpy(&hk.b, hash, sizeof(*hash));
hk.aw = aw;
@ -1429,6 +1430,7 @@ static void get_outline_glyph(int symbol, glyph_info_t* info, FT_Vector* advance
int error;
glyph_hash_val_t* val;
glyph_hash_key_t key;
memset(&key, 0, sizeof(key));
key.font = render_context.font;
key.size = render_context.font_size;
key.ch = symbol;
@ -1873,6 +1875,7 @@ static void transform_3d(FT_Vector shift, FT_Glyph* glyph, FT_Glyph* glyph2, dou
/**
* \brief Main ass rendering function, glues everything together
* \param event event to render
* \param event_images struct containing resulting images, will also be initialized
* Process event, appending resulting ass_image_t's to images_root.
*/
static int ass_render_event(ass_event_t* event, event_images_t* event_images)
@ -2166,6 +2169,7 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images)
for (i = 0; i < text_info.length; ++i)
get_bitmap_glyph(text_info.glyphs + i);
memset(event_images, 0, sizeof(*event_images));
event_images->top = device_y - d6_to_int(text_info.lines[0].asc);
event_images->height = d6_to_int(text_info.height);
event_images->detect_collisions = render_context.detect_collisions;