From ae0f98f72f32b71b061d9e9abcf27af5409ae965 Mon Sep 17 00:00:00 2001 From: Thomas Guillem Date: Tue, 28 May 2019 10:15:11 +0200 Subject: [PATCH] rc: fix item leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no need to hold the item since the player is locked while it is accessed. Fixes #22328 Signed-off-by: RĂ©mi Denis-Courmont --- modules/control/rc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/control/rc.c b/modules/control/rc.c index 4ec92712e8..e2c6e2b15c 100644 --- a/modules/control/rc.c +++ b/modules/control/rc.c @@ -1573,7 +1573,7 @@ static void *Run( void *data ) /* Manage the input part */ if( item == NULL ) { - item = vlc_player_HoldCurrentMedia(player); + item = vlc_player_GetCurrentMedia(player); /* New input has been registered */ if( item ) { @@ -1586,10 +1586,7 @@ static void *Run( void *data ) if( !vlc_player_IsStarted( player ) ) { if (item) - { - input_item_Release( item ); item = NULL; - } p_sys->last_state = VLC_PLAYER_STATE_STOPPED; msg_rc( STATUS_CHANGE "( stop state: 0 )" );