X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcontrol%2Fgestures.c;h=df9f8079e1620183e660a5f3f1aac66d70f06b9d;hb=981577922c4384c7cd349217e49e75a658fd5882;hp=d2d02dfafc685d09976bd4f291b462bbdf7bb693;hpb=3561b9b28f58eb7a4183e158a8fd973800d31ceb;p=vlc diff --git a/modules/control/gestures.c b/modules/control/gestures.c index d2d02dfafc..df9f8079e1 100644 --- a/modules/control/gestures.c +++ b/modules/control/gestures.c @@ -226,11 +226,7 @@ static void RunIntf( intf_thread_t *p_intf ) case GESTURE(RIGHT,LEFT,NONE,NONE): { input_thread_t * p_input; - p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, - FIND_ANYWHERE ); - - if( !p_playlist ) - break; + p_playlist = pl_Yield( p_intf ); p_input = input_from_playlist( p_playlist ); vlc_object_release( p_playlist ); @@ -257,23 +253,13 @@ static void RunIntf( intf_thread_t *p_intf ) } break; case GESTURE(LEFT,DOWN,NONE,NONE): - p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, - FIND_ANYWHERE ); - if( p_playlist == NULL ) - { - break; - } + p_playlist = pl_Yield( p_intf ); playlist_Prev( p_playlist ); vlc_object_release( p_playlist ); break; case GESTURE(RIGHT,DOWN,NONE,NONE): - p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, - FIND_ANYWHERE ); - if( p_playlist == NULL ) - { - break; - } + p_playlist = pl_Yield( p_intf ); playlist_Next( p_playlist ); vlc_object_release( p_playlist ); @@ -306,11 +292,7 @@ static void RunIntf( intf_thread_t *p_intf ) vlc_value_t val, list, list2; int i_count, i; - p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, - FIND_ANYWHERE ); - - if( !p_playlist ) - break; + p_playlist = pl_Yield( p_intf ); p_input = input_from_playlist( p_playlist ); @@ -365,11 +347,7 @@ static void RunIntf( intf_thread_t *p_intf ) vlc_value_t val, list, list2; int i_count, i; - p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, - FIND_ANYWHERE ); - - if( !p_playlist ) - break; + p_playlist = pl_Yield( p_intf ); p_input = input_from_playlist( p_playlist ); vlc_object_release( p_playlist ); @@ -442,7 +420,7 @@ static void RunIntf( intf_thread_t *p_intf ) /* * video output */ - if( p_intf->p_sys->p_vout && p_intf->p_sys->p_vout->b_die ) + if( p_intf->p_sys->p_vout && !vlc_object_alive (p_intf->p_sys->p_vout) ) { var_DelCallback( p_intf->p_sys->p_vout, "mouse-moved", MouseEvent, p_intf ); @@ -507,6 +485,7 @@ static int InitThread( intf_thread_t * p_intf ) { p_intf->p_sys->i_button_mask = 4; } + free( psz_button ); p_intf->p_sys->i_pattern = 0; p_intf->p_sys->i_num_gestures = 0;