glyph_hash_size = 0;
}
-void ass_glyph_cache_done(void)
+void ass_glyph_cache_reset(void)
{
int i;
for (i = 0; i < GLYPH_HASH_SIZE; ++i) {
item = next;
}
}
- free(glyph_hash_root);
glyph_hash_size = 0;
}
+void ass_glyph_cache_done(void)
+{
+ ass_glyph_cache_reset();
+ free(glyph_hash_root);
+}
+
void ass_glyph_cache_init(void);
void cache_add_glyph(glyph_hash_key_t* key, glyph_hash_val_t* val);
glyph_hash_val_t* cache_find_glyph(glyph_hash_key_t* key);
+void ass_glyph_cache_reset(void);
void ass_glyph_cache_done(void);
#endif
void ass_configure(ass_instance_t* priv, const ass_settings_t* config)
{
- memcpy(&priv->settings, config, sizeof(ass_settings_t));
+ if (memcmp(&priv->settings, config, sizeof(ass_settings_t)) != 0) {
+ mp_msg(MSGT_GLOBAL, MSGL_V, "ass_configure: %d x %d; margins: l: %d, r: %d, t: %d, b: %d \n",
+ config->frame_width, config->frame_height,
+ config->left_margin, config->right_margin, config->top_margin, config->bottom_margin);
+ memcpy(&priv->settings, config, sizeof(ass_settings_t));
+ ass_glyph_cache_reset();
+ }
}
/**