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

freetype: potential divide by zero crash.

parent 5a16baa2
...@@ -3128,9 +3128,12 @@ static int GetFontSize( filter_t *p_filter ) ...@@ -3128,9 +3128,12 @@ 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 );
i_size = (int)p_filter->fmt_out.video.i_height / val.i_int; if( val.i_int > 0 )
p_filter->p_sys->i_display_height = {
p_filter->fmt_out.video.i_height; i_size = (int)p_filter->fmt_out.video.i_height / val.i_int;
p_filter->p_sys->i_display_height =
p_filter->fmt_out.video.i_height;
}
} }
if( i_size <= 0 ) if( i_size <= 0 )
{ {
......
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