[vlc-commits] freetype: fix glyph leak on line wrap

Francois Cartegnie git at videolan.org
Mon Aug 3 10:54:24 CEST 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Aug  1 14:45:02 2020 +0200| [9022b8c46710f10d087896312ad16e548852618c] | committer: Francois Cartegnie

freetype: fix glyph leak on line wrap

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9022b8c46710f10d087896312ad16e548852618c
---

 modules/text_renderer/freetype/text_layout.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/text_renderer/freetype/text_layout.c b/modules/text_renderer/freetype/text_layout.c
index 84a3ed74d0..989fd9fc12 100644
--- a/modules/text_renderer/freetype/text_layout.c
+++ b/modules/text_renderer/freetype/text_layout.c
@@ -1588,7 +1588,10 @@ static int LayoutParagraph( filter_t *p_filter, paragraph_t *p_paragraph,
             {
                 i_width = i_width - i_last_space_width;
                 if( i_newline_start + 1 < p_paragraph->i_size )
+                {
                     i_line_start = i_newline_start + 1;
+                    ReleaseGlyphBitMaps( &p_paragraph->p_glyph_bitmaps[ i_newline_start ] );
+                }
                 else
                     i_line_start = i_newline_start; // == i
             }



More information about the vlc-commits mailing list