Commit cdc8bcd3 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

freetype: potential divide by zero crash.

parent 5a16baa2
...@@ -3128,10 +3128,13 @@ static int GetFontSize( filter_t *p_filter ) ...@@ -3128,10 +3128,13 @@ static int GetFontSize( filter_t *p_filter )
else else
{ {
var_Get( p_filter, "freetype-rel-fontsize", &val ); var_Get( p_filter, "freetype-rel-fontsize", &val );
if( val.i_int > 0 )
{
i_size = (int)p_filter->fmt_out.video.i_height / val.i_int; i_size = (int)p_filter->fmt_out.video.i_height / val.i_int;
p_filter->p_sys->i_display_height = p_filter->p_sys->i_display_height =
p_filter->fmt_out.video.i_height; p_filter->fmt_out.video.i_height;
} }
}
if( i_size <= 0 ) if( i_size <= 0 )
{ {
msg_Warn( p_filter, "invalid fontsize, using 12" ); msg_Warn( p_filter, "invalid fontsize, using 12" );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment