]> granicus.if.org Git - libass/commitdiff
Simplify ass_glyph_cache_reset().
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 26 Aug 2006 20:09:54 +0000 (20:09 +0000)
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 26 Aug 2006 20:09:54 +0000 (20:09 +0000)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19551 b3059339-0415-0410-9bf9-f77b7e298cf2

libass/ass_cache.c

index 8409e2d6225a0f92f800230d41b7b867fc675245..64f915becf7354e833a05fa6ae8f307a09c19ff7 100644 (file)
@@ -190,7 +190,7 @@ void ass_glyph_cache_init(void)
        glyph_hash_size = 0;
 }
 
-void ass_glyph_cache_reset(void)
+void ass_glyph_cache_done(void)
 {
        int i;
        for (i = 0; i < GLYPH_HASH_SIZE; ++i) {
@@ -203,12 +203,13 @@ void ass_glyph_cache_reset(void)
                        item = next;
                }
        }
+       free(glyph_hash_root);
        glyph_hash_size = 0;
 }
 
-void ass_glyph_cache_done(void)
+void ass_glyph_cache_reset(void)
 {
-       ass_glyph_cache_reset();
-       free(glyph_hash_root);
+       ass_glyph_cache_done();
+       ass_glyph_cache_init();
 }