rc: fix item leak

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 <remi@remlab.net>
This commit is contained in:
Thomas Guillem 2019-05-28 10:15:11 +02:00 committed by Rémi Denis-Courmont
parent 60220ade56
commit ae0f98f72f
1 changed files with 1 additions and 4 deletions

View File

@ -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 )" );