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

Francois Cartegnie git at videolan.org
Thu Sep 10 23:11:28 CEST 2020


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

freetype: fix glyph leak on line wrap

(cherry picked from commit 9022b8c46710f10d087896312ad16e548852618c)

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

 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 f4e211b83a..243a7f717a 100644
--- a/modules/text_renderer/freetype/text_layout.c
+++ b/modules/text_renderer/freetype/text_layout.c
@@ -1478,7 +1478,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