[vlc-devel] commit: logo: inform listeners when picture has been moved ( Jean-Paul Saman )
Laurent Aimar
fenrir at via.ecp.fr
Thu Feb 11 12:23:11 CET 2010
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).
As said in comment to the previous commit, I think it should be made a
variable to the logo object directly.
Regards,
--
fenrir
More information about the vlc-devel
mailing list