[vlc-devel] [PATCH 4/4] freetype: apply sub-text-scale factor where possible

Rémi Denis-Courmont remi at remlab.net
Fri Aug 28 20:09:47 CEST 2015


On Friday 28 August 2015 21:08:02 Rémi Denis-Courmont wrote:
> On Friday 28 August 2015 20:01:31 Francois Cartegnie wrote:
> > @@ -1225,6 +1241,13 @@ static int Create( vlc_object_t *p_this )
> > 
> >      free( psz_fontfile );
> >      free( psz_monofontfile );
> > 
> > +    atomic_init( &p_sys->i_scale_factor, var_InheritInteger( p_filter,
> > "sub-text-scale") );
> > +    if( p_filter->p_parent && p_filter->p_parent->p_parent )
> 
> WTH is this supposed to mean? Aside from layering violation, that is.
> 
> > +    {
> > +        p_sys->b_callback = ( var_AddCallback(
> > p_filter->p_parent->p_parent,
> > +            "sub-text-scale", VarCallback,
> > &p_sys->i_scale_factor ) == VLC_SUCCESS );
> 
> This is way too brittle. It´s a question of when, not if, it will break
> silently.

In fact, I think it´s already broken. You may lose events.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list