- vlc_object_t *p_this = vlclua_get_this( L );
- vout_OSDMessage( p_this, i_chan, "%s", psz_message );
+
+ input_thread_t *p_input = vlclua_get_input_internal( L );
+ if( p_input )
+ {
+ vout_thread_t *p_vout = input_GetVout( p_input );
+ if( p_vout )
+ {
+ vout_OSDMessage( p_vout, i_chan, "%s", psz_message );
+ vlc_object_release( p_vout );
+ }
+ vlc_object_release( p_input );
+ }