]> git.sesse.net Git - vlc/commitdiff
mediacontrol API: implement mediacontrol_StreamInformation__free in the public API.
authorOlivier Aubert <olivier.aubert@liris.cnrs.fr>
Mon, 7 May 2007 13:22:03 +0000 (13:22 +0000)
committerOlivier Aubert <olivier.aubert@liris.cnrs.fr>
Mon, 7 May 2007 13:22:03 +0000 (13:22 +0000)
include/vlc/mediacontrol.h
src/control/mediacontrol_util.c

index 3c53a3e9acca55a741863238f39bc0b5fee81fe5..39f8a998af190e2eed016c6d751db058a8ee5d95 100644 (file)
@@ -134,6 +134,13 @@ mediacontrol_PlaylistSeq *mediacontrol_PlaylistSeq__alloc( int size );
 
 VLC_PUBLIC_API void mediacontrol_PlaylistSeq__free( mediacontrol_PlaylistSeq *ps );
 
+/**
+ * Free a StreamInformation structure.
+ * \param pic: the StreamInformation structure
+ */
+VLC_PUBLIC_API void
+mediacontrol_StreamInformation__free( mediacontrol_StreamInformation* p_si );
+
 /**
  * Instanciate and initialize an exception structure.
  * \return the exception
index 0bc8f08da8c2ac0725748b1d4b88bbdfda408648..b4c54010755c6842068331409c37c6177807cd75 100644 (file)
@@ -216,8 +216,10 @@ void
 mediacontrol_RGBPicture__free( mediacontrol_RGBPicture* pic )
 {
     if( pic )
+    {
         free( pic->data );
-    free( pic );
+        free( pic );
+    }
 }
 
 mediacontrol_PlaylistSeq*
@@ -242,11 +244,22 @@ mediacontrol_PlaylistSeq__free( mediacontrol_PlaylistSeq* ps )
         int i;
         for( i = 0 ; i < ps->size ; i++ )
             free( ps->data[i] );
+        free( ps->data );
+        free( ps );
     }
-    free( ps->data );
-    free( ps );
 }
 
+void
+mediacontrol_StreamInformation__free( mediacontrol_StreamInformation* p_si )
+{
+  if( p_si )
+  {
+      free( p_si->url );
+      free( p_si );
+  }
+}
+
+
 mediacontrol_Exception*
 mediacontrol_exception_create( void )
 {