[vlc-commits] player: fix null-deref with corks callbacks
Thomas Guillem
git at videolan.org
Mon Mar 23 09:26:36 CET 2020
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Mar 19 14:13:11 2020 +0100| [7fb8423fb486f3c7bbcb93581686c4524fab34d6] | committer: Thomas Guillem
player: fix null-deref with corks callbacks
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7fb8423fb486f3c7bbcb93581686c4524fab34d6
---
src/player/player.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/player/player.c b/src/player/player.c
index 38c9b5aa57..a1a39a28f5 100644
--- a/src/player/player.c
+++ b/src/player/player.c
@@ -1911,7 +1911,7 @@ vlc_player_Delete(vlc_player_t *player)
vlc_player_DestroyTimer(player);
vlc_player_aout_DelCallbacks(player);
- var_DelCallback(player, "corks", vlc_player_CorkCallback, NULL);
+ var_DelCallback(player, "corks", vlc_player_CorkCallback, player);
input_resource_Release(player->resource);
if (player->renderer)
@@ -2005,7 +2005,7 @@ vlc_player_New(vlc_object_t *parent, enum vlc_player_lock_type lock_type,
vlc_player_aout_AddCallbacks(player);
input_resource_PutAout(player->resource, aout);
}
- var_AddCallback(player, "corks", vlc_player_CorkCallback, NULL);
+ var_AddCallback(player, "corks", vlc_player_CorkCallback, player);
player->deleting = false;
vlc_player_InitLocks(player, lock_type);
@@ -2023,7 +2023,7 @@ vlc_player_New(vlc_object_t *parent, enum vlc_player_lock_type lock_type,
error:
if (aout)
vlc_player_aout_DelCallbacks(player);
- var_DelCallback(player, "corks", vlc_player_CorkCallback, NULL);
+ var_DelCallback(player, "corks", vlc_player_CorkCallback, player);
if (player->resource)
input_resource_Release(player->resource);
More information about the vlc-commits
mailing list