Commit 463b4aa9 authored by Thomas Guillem's avatar Thomas Guillem

lib: media_discoverer: fix media leak

parent 8b30e613
......@@ -119,11 +119,14 @@ static void services_discovery_item_removed( const vlc_event_t * p_event,
for( i = 0; i < count; i++ )
{
p_md = libvlc_media_list_item_at_index( p_mdis->p_mlist, i );
assert(p_md != NULL);
if( p_md->p_input_item == p_item )
{
libvlc_media_list_internal_remove_index( p_mdis->p_mlist, i );
libvlc_media_release( p_md );
break;
}
libvlc_media_release( p_md );
}
libvlc_media_list_unlock( p_mdis->p_mlist );
}
......
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