1
mirror of https://code.videolan.org/videolan/vlc synced 2024-07-21 07:24:15 +02:00

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

View File

@ -1573,7 +1573,7 @@ static void *Run( void *data )
/* Manage the input part */ /* Manage the input part */
if( item == NULL ) if( item == NULL )
{ {
item = vlc_player_HoldCurrentMedia(player); item = vlc_player_GetCurrentMedia(player);
/* New input has been registered */ /* New input has been registered */
if( item ) if( item )
{ {
@ -1586,10 +1586,7 @@ static void *Run( void *data )
if( !vlc_player_IsStarted( player ) ) if( !vlc_player_IsStarted( player ) )
{ {
if (item) if (item)
{
input_item_Release( item );
item = NULL; item = NULL;
}
p_sys->last_state = VLC_PLAYER_STATE_STOPPED; p_sys->last_state = VLC_PLAYER_STATE_STOPPED;
msg_rc( STATUS_CHANGE "( stop state: 0 )" ); msg_rc( STATUS_CHANGE "( stop state: 0 )" );