]> git.sesse.net Git - vlc/blobdiff - modules/access/directory.c
Used VLC_CODEC_* and vlc_fourcc_GetCodec when suitable.
[vlc] / modules / access / directory.c
index 4b3e57ab0646081113ebd2b0705f276958466822..05b6ec1615e65737d233c2f837db8e8bc32de479 100644 (file)
@@ -53,6 +53,7 @@
 
 #include <vlc_charset.h>
 #include <vlc_url.h>
+#include <vlc_strings.h>
 
 /*****************************************************************************
  * Module descriptor
@@ -383,11 +384,17 @@ static block_t *Block (access_t *p_access)
             if (old_xspf_extension == NULL)
                 goto fatal;
 
-            int len2 = asprintf( &p_sys->psz_xspf_extension, "%s  <vlc:node title=\"%s\">\n", old_xspf_extension, entry );
-            if (len2 == -1)
+            char *title = convert_xml_special_chars (entry);
+            if (title == NULL
+             || asprintf (&p_sys->psz_xspf_extension, "%s"
+                          "  <vlc:node title=\"%s\">\n", old_xspf_extension,
+                          title) == -1)
+            {
+                free (title);
                 goto fatal;
-            free( old_xspf_extension );
-
+            }
+            free (title);
+            free (old_xspf_extension);
             return NULL;
         }
         else