vlc | branch: master | Francois Cartegnie <[email protected]> | Fri Jun 2 18:49:15 2017 +0200| [f95b3d9e846107a55d12e8af0357d8b8cf2b59d8] | committer: Francois Cartegnie
text_renderer: freetype: don't fail on line with empty bitmap (fix #18365) > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f95b3d9e846107a55d12e8af0357d8b8cf2b59d8 --- modules/text_renderer/freetype/text_layout.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/text_renderer/freetype/text_layout.c b/modules/text_renderer/freetype/text_layout.c index 4cbf1ef250..d0d0f60aea 100644 --- a/modules/text_renderer/freetype/text_layout.c +++ b/modules/text_renderer/freetype/text_layout.c @@ -1340,6 +1340,13 @@ static int LayoutParagraph( filter_t *p_filter, paragraph_t *p_paragraph, i_total_width += p_paragraph->p_glyph_bitmaps[ i ].i_x_advance; } + if( i_total_width == 0 ) + { + for( int i=0; i < p_paragraph->i_size; ++i ) + ReleaseGlyphBitMaps( &p_paragraph->p_glyph_bitmaps[ i ] ); + return VLC_SUCCESS; + } + int i_line_count = i_total_width / i_max_width + 1; i_preferred_width = i_total_width / i_line_count; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
