[vlc-commits] libvlc: player: detach listener on destroy
Romain Vimont
git at videolan.org
Tue Jun 18 12:16:39 CEST 2019
vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Mon Jun 17 11:44:00 2019 +0200| [6e4ea0ff1a529780ad3267227ff1a0f6555815aa] | committer: Jean-Baptiste Kempf
libvlc: player: detach listener on destroy
Fix possible segfault, when receiving the preparsed event after the
libvlc_media_t instance was deleted.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6e4ea0ff1a529780ad3267227ff1a0f6555815aa
---
lib/media_player.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/media_player.c b/lib/media_player.c
index 4ec277034c..667ec517d0 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -795,6 +795,8 @@ static void libvlc_media_player_destroy( libvlc_media_player_t *p_mi )
vlc_player_Delete(p_mi->player);
+ if (p_mi->p_md)
+ media_detach_preparsed_event(p_mi->p_md);
libvlc_event_manager_destroy(&p_mi->event_manager);
libvlc_media_release( p_mi->p_md );
More information about the vlc-commits
mailing list