]> git.sesse.net Git - vlc/commitdiff
Use input_GetVout
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 10 Feb 2010 16:41:59 +0000 (18:41 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 10 Feb 2010 16:43:28 +0000 (18:43 +0200)
modules/control/rc.c
modules/gui/ncurses.c
modules/misc/lua/libs/video.c

index db0d9666df2033a27ae83f02a9152e0d822255fa..8a85af2c01ed4319e20356c8a2825bb7032607bb 100644 (file)
@@ -743,9 +743,7 @@ static void Run( intf_thread_t *p_intf )
         case 'F':
             if( p_input )
             {
-                vout_thread_t *p_vout;
-                p_vout = input_GetVout( p_input );
-
+                vout_thread_t *p_vout = input_GetVout( p_input );
                 if( p_vout )
                 {
                     vlc_value_t val;
index f40f81d5a6ec044e612310983764f0650c481e48..0ea1a53b4bc632c8fb076e85bf1a87ea2ca00226 100644 (file)
@@ -1117,9 +1117,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
         {
             if( p_intf->p_sys->p_input )
             {
-                vout_thread_t *p_vout;
-                p_vout = vlc_object_find( p_intf->p_sys->p_input,
-                                          VLC_OBJECT_VOUT, FIND_CHILD );
+                vout_thread_t *p_vout = inputGetVout( p_intf->p_sys->p_input );
                 if( p_vout )
                 {
                     var_ToggleBool( p_vout, "fullscreen" );
index ff26fee6e260a7778a54c44733882cdf8da877e7..c1c023d9fb4ec88667e4d387258e7c6e895679fd 100644 (file)
@@ -53,8 +53,9 @@ static int vlclua_fullscreen( lua_State *L )
     input_thread_t * p_input = vlclua_get_input_internal( L );
     if( !p_input ) return vlclua_error( L );
 
-    p_vout = vlc_object_find( p_input, VLC_OBJECT_VOUT, FIND_CHILD );
+    p_vout = input_GetVout( p_input );
     if( !p_vout ) return vlclua_error( L );
+#warning ^^ How about releasing the input?
 
     i_ret = vlclua_var_toggle_or_set( L, p_vout, "fullscreen" );
     vlc_object_release( p_vout );