[vlc-commits] rc: fix item leak

Thomas Guillem git at videolan.org
Tue May 28 19:27:12 CEST 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue May 28 10:15:11 2019 +0200| [ae0f98f72f32b71b061d9e9abcf27af5409ae965] | committer: Rémi Denis-Courmont

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 at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ae0f98f72f32b71b061d9e9abcf27af5409ae965
---

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



More information about the vlc-commits mailing list