From: Rafaël Carré Date: Tue, 27 May 2008 12:25:59 +0000 (+0200) Subject: Avoid using vlc_object_find() when not needed X-Git-Tag: 0.9.0-test0~641 X-Git-Url: http://git.videolan.org/gitweb.cgi/vlc.git/?p=vlc.git;p=vlc.git;a=commitdiff_plain;h=ee6f60d7278f9d45835522eb60c247ee8bef77ac Avoid using vlc_object_find() when not needed --- diff --git a/src/video_output/video_text.c b/src/video_output/video_text.c index bb77890cfa..d5cebcc4a1 100644 --- a/src/video_output/video_text.c +++ b/src/video_output/video_text.c @@ -131,7 +131,14 @@ void __vout_OSDMessage( vlc_object_t *p_caller, int i_channel, if( !config_GetInt( p_caller, "osd" ) ) return; - p_vout = vlc_object_find( p_caller, VLC_OBJECT_VOUT, FIND_ANYWHERE ); + if( p_caller->i_object_type == VLC_OBJECT_VOUT ) + { + p_vout = (vout_thread_t*) p_caller; + vlc_object_yield( p_vout ); + } + else + p_vout = vlc_object_find( p_caller, VLC_OBJECT_VOUT, FIND_ANYWHERE ); + if( p_vout ) { va_start( args, psz_format );