]> git.sesse.net Git - vlc/blobdiff - modules/misc/profile_parser.c
Put the _same_ _platform-independent_ stuff in the same place
[vlc] / modules / misc / profile_parser.c
index 11e153c8c516dffb778520a13eaf34f819ffb7c6..5040d3534e5d70e069e049b3694ddb81a0462e0a 100644 (file)
@@ -2,7 +2,7 @@
  * profile_parser.c : VLC Streaming Profile parser
  *****************************************************************************
  * Copyright (C) 2003-2006 the VideoLAN team
- * $Id: rtsp.c 16204 2006-08-03 16:58:10Z zorglub $
+ * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Gildas Bazin <gbazin@videolan.org>
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
+#include <vlc_plugin.h>
+#include <vlc_stream.h>
 #include <vlc_streaming.h>
-#include "vlc_stream.h"
 #include "vlc_xml.h"
 
 /*****************************************************************************
@@ -43,8 +48,8 @@ static int Open( vlc_object_t *p_this )
     xml_t *p_xml;
     xml_reader_t *p_reader;
     int i_ret;
-    char *psz_elname;
-   
+    char *psz_elname = NULL;
+
     /* Open the profile and get a XML reader from it */
     if( !p_stream )
     {
@@ -55,8 +60,7 @@ static int Open( vlc_object_t *p_this )
     if( !p_xml ) return VLC_EGENERIC;
     p_reader = xml_ReaderCreate( p_xml, p_stream );
 
-
-    if( xml_ReaderRead( p_reader ) != 1 || 
+    if( xml_ReaderRead( p_reader ) != 1 ||
         xml_ReaderNodeType( p_reader ) != XML_READER_STARTELEM )
     {
         msg_Err( p_this, "invalid file (invalid root)" );
@@ -75,7 +79,7 @@ static int Open( vlc_object_t *p_this )
             return -1;
 
         case XML_READER_STARTELEM:
-            FREE( psz_elname );
+            free( psz_elname );
             psz_elname = xml_ReaderName( p_reader );
             if( !psz_elname ) return VLC_EGENERIC;
             printf( "<%s", psz_elname );
@@ -84,7 +88,7 @@ static int Open( vlc_object_t *p_this )
         case XML_READER_TEXT:
             break;
         case XML_READER_ENDELEM:
-            FREE( psz_elname );
+            free( psz_elname );
             psz_elname = xml_ReaderName( p_reader );
             if( !psz_elname ) return VLC_EGENERIC;
             printf( ">" );