[vlc-devel] [PATCH 9/9] libvlc: media: cancel preparsing when releasing a media

Thomas Guillem thomas at gllm.fr
Wed Jun 1 13:24:53 CEST 2016


---
 lib/media.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/media.c b/lib/media.c
index 71e8879..51aa737 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -528,6 +528,11 @@ void libvlc_media_release( libvlc_media_t *p_md )
 
     uninstall_input_item_observer( p_md );
 
+    /* Cancel asynchronous parsing (if any) */
+    if( p_md->p_input_item )
+        libvlc_MetadataCancel( p_md->p_libvlc_instance->p_libvlc_int,
+                               p_md->p_input_item );
+
     if( p_md->p_subitems )
         libvlc_media_list_release( p_md->p_subitems );
 
-- 
2.8.1



More information about the vlc-devel mailing list