Mercurial > mplayer.hg
diff libass/ass_bitmap.c @ 31853:e64df5862cea
Import libass 0.9.10
author | greg |
---|---|
date | Fri, 06 Aug 2010 21:13:41 +0000 |
parents | 48d020c5ceca |
children | ac6e48baa03d |
line wrap: on
line diff
--- a/libass/ass_bitmap.c Fri Aug 06 10:48:16 2010 +0000 +++ b/libass/ass_bitmap.c Fri Aug 06 21:13:41 2010 +0000 @@ -139,8 +139,8 @@ static Bitmap *alloc_bitmap(int w, int h) { Bitmap *bm; - bm = calloc(1, sizeof(Bitmap)); - bm->buffer = malloc(w * h); + bm = malloc(sizeof(Bitmap)); + bm->buffer = calloc(w, h); bm->w = w; bm->h = h; bm->left = bm->top = 0; @@ -165,7 +165,7 @@ return dst; } -static int check_glyph_area(ASS_Library *library, FT_Glyph glyph) +int check_glyph_area(ASS_Library *library, FT_Glyph glyph) { FT_BBox bbox; long long dx, dy; @@ -213,7 +213,6 @@ w = bit->width; h = bit->rows; bm = alloc_bitmap(w + 2 * bord, h + 2 * bord); - memset(bm->buffer, 0, bm->w * bm->h); bm->left = bg->left - bord; bm->top = -bg->top - bord;