[vlc-devel] [PATCH] libvlc: player: detach listener on destroy
Romain Vimont
rom1v at videolabs.io
Mon Jun 17 11:44:00 CEST 2019
Fix possible segfault, when receiving the preparsed event after the
libvlc_media_t instance was deleted.
---
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 );
--
2.20.1
More information about the vlc-devel
mailing list