[vlc-commits] libvlc: don't release media_list while it's used by media

Thomas Guillem git at videolan.org
Thu Nov 5 12:37:05 CET 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Nov  5 12:35:21 2015 +0100| [860f831fc1ee17caca4225e40bb78fc5b8964dc7] | committer: Thomas Guillem

libvlc: don't release media_list while it's used by media

Indeed, events callbacks can access the media_list.

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

 lib/media.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/media.c b/lib/media.c
index 8919093..20266ae 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -507,10 +507,11 @@ void libvlc_media_release( libvlc_media_t *p_md )
     if( p_md->i_refcount > 0 )
         return;
 
+    uninstall_input_item_observer( p_md );
+
     if( p_md->p_subitems )
         libvlc_media_list_release( p_md->p_subitems );
 
-    uninstall_input_item_observer( p_md );
     vlc_gc_decref( p_md->p_input_item );
 
     vlc_cond_destroy( &p_md->parsed_cond );



More information about the vlc-commits mailing list