[vlc-devel] commit: logo: inform listeners when picture has been moved ( Jean-Paul Saman )
Jean-Paul Saman
jpsaman at gmail.com
Thu Feb 11 12:58:37 CET 2010
On Thu, Feb 11, 2010 at 12:23 PM, Laurent Aimar <fenrir at via.ecp.fr> wrote:
> Hi,
>
> On Thu, Feb 11, 2010, git version control wrote:
>> logo: inform listeners when picture has been moved
>> @@ -534,6 +533,14 @@ static int Mouse( filter_t *p_filter, vlc_mouse_t *p_mouse,
>> p_filter->fmt_in.video.i_width - i_logo_w );
>> p_sys->i_pos_y = __MIN( __MAX( p_sys->i_pos_y + i_dy, 0 ),
>> p_filter->fmt_in.video.i_height - i_logo_h );
>> +
>> + /* object under mouse has moved */
>> + var_SetBool( p_filter->p_parent, "mouse-object", true );
>> + }
>> + else if( b_over )
>> + {
>> + /* object under mouse stoped moving */
>> + var_SetBool( p_filter->p_parent, "mouse-object", false );
> You cannot use p_filter->p_parent, it is dangerous and should be avoided
> in every new code.
> Besides that, a filter can be created without being attached to a vout
> object (like in transcode probably).
Didn't think of that, good catch.
> As said in comment to the previous commit, I think it should be made a
> variable to the logo object directly.
>
See my question in the previous e-mail.
gtz
Jean-Paul Saman
More information about the vlc-devel
mailing list