]> git.sesse.net Git - vlc/blobdiff - modules/services_discovery/sap.c
podcast: per item add/remove request
[vlc] / modules / services_discovery / sap.c
index 234d98fe27b005911ffb8f77d55f18cbe39d203a..eefd8930a7b42e033d971974e5457214d52bbe23 100644 (file)
@@ -468,11 +468,10 @@ static void Close( vlc_object_t *p_this )
 static void CloseDemux( vlc_object_t *p_this )
 {
     demux_t *p_demux = (demux_t *)p_this;
-    if( p_demux->p_sys )
-    {
-        if( p_demux->p_sys->p_sdp ) { FreeSDP( p_demux->p_sys->p_sdp ); p_demux->p_sys->p_sdp = NULL; }
-        free( p_demux->p_sys );
-    }
+
+    if( p_demux->p_sys->p_sdp )
+        FreeSDP( p_demux->p_sys->p_sdp );
+    free( p_demux->p_sys );
 }
 
 /*****************************************************************************
@@ -680,6 +679,7 @@ static int Demux( demux_t *p_demux )
     p_parent_input->i_type = ITEM_TYPE_NET;
 
     vlc_mutex_unlock( &p_parent_input->lock );
+    vlc_object_release( p_input );
     return VLC_SUCCESS;
 }