mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-04 09:11:33 +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:
parent
60220ade56
commit
ae0f98f72f
@ -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 )" );
|
||||||
|
Loading…
Reference in New Issue
Block a user