Commit 6b20068d authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

Gestures: Make sure we that p_playlist is valid, and correctly release p_input and p_playlist.

parent 04ccd548
......@@ -166,11 +166,6 @@ static void RunIntf( intf_thread_t *p_intf )
{
playlist_t * p_playlist = NULL;
vlc_mutex_lock( &p_intf->change_lock );
p_intf->p_sys->p_vout = NULL;
vlc_mutex_unlock( &p_intf->change_lock );
if( InitThread( p_intf ) < 0 )
{
msg_Err( p_intf, "can't initialize interface thread" );
......@@ -227,6 +222,9 @@ static void RunIntf( intf_thread_t *p_intf )
p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( !p_playlist )
break;
p_input = input_from_playlist( p_playlist );
if( !p_input )
......@@ -324,12 +322,16 @@ static void RunIntf( intf_thread_t *p_intf )
i_count = list.p_list->i_count;
if( i_count <= 1 )
{
vlc_object_release( p_input );
vlc_object_release( p_playlist );
continue;
}
for( i = 0; i < i_count; i++ )
{
if( val.i_int == list.p_list->p_values[i].i_int )
{
vlc_object_release( p_input );
vlc_object_release( p_playlist );
break;
}
}
......@@ -377,7 +379,6 @@ static void RunIntf( intf_thread_t *p_intf )
vlc_object_release( p_playlist );
break;
}
var_Get( p_input, "spu-es", &val );
var_Change( p_input, "spu-es", VLC_VAR_GETCHOICES,
......@@ -385,12 +386,16 @@ static void RunIntf( intf_thread_t *p_intf )
i_count = list.p_list->i_count;
if( i_count <= 1 )
{
vlc_object_release( p_input );
vlc_object_release( p_playlist );
continue;
}
for( i = 0; i < i_count; i++ )
{
if( val.i_int == list.p_list->p_values[i].i_int )
{
vlc_object_release( p_input );
vlc_object_release( p_playlist );
break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment