[vlc-devel] [Patch] Sending a signal when a vout is created/destroyed

Laurent Aimar fenrir at via.ecp.fr
Wed Jan 20 01:00:00 CET 2010


On Wed, Jan 20, 2010, Hugo Beauzee-Luyssen wrote:
> That wasn't intentional, but indeed, bool is not to be used in this
> file. has_vout is still int, but the value is now explicitly casted to
> int

> +    else if ( newval.i_int == INPUT_EVENT_VOUT )
> +    {
> +        vout_thread_t* vout = input_GetVout( p_input );
> +        bool    has_vout = (int)( vout != NULL);
Casting bool to int is useless, even more when has_vout is a bool.
 bool has_vout = vout != NULL;
 event.u.media_player_vout_changed.has_vout = has_vout
is fine.

-- 
fenrir




More information about the vlc-devel mailing list