]> 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 a59078c13282ea0113b3067ec343ca51b82b01b5..05b6ec1615e65737d233c2f837db8e8bc32de479 100644 (file)
@@ -53,6 +53,7 @@
 
 #include <vlc_charset.h>
 #include <vlc_url.h>
+#include <vlc_strings.h>
 
 /*****************************************************************************
  * Module descriptor
@@ -88,10 +89,10 @@ vlc_module_begin ()
     add_shortcut( "dir" )
     add_shortcut( "file" )
     add_string( "recursive", "expand" , NULL, RECURSIVE_TEXT,
-                RECURSIVE_LONGTEXT, false );
-      change_string_list( psz_recursive_list, psz_recursive_list_text, 0 );
-    add_string( "ignore-filetypes", "m3u,db,nfo,jpg,gif,sfv,txt,sub,idx,srt,cue,ssa",
-                NULL, IGNORE_TEXT, IGNORE_LONGTEXT, false );
+                RECURSIVE_LONGTEXT, false )
+      change_string_list( psz_recursive_list, psz_recursive_list_text, 0 )
+    add_string( "ignore-filetypes", "m3u,db,nfo,ini,jpg,jpeg,ljpg,gif,png,pgm,pgmyuv,pbm,pam,tga,bmp,pnm,xpm,xcf,pcx,tif,tiff,lbm,sfv,txt,sub,idx,srt,cue,ssa",
+                NULL, IGNORE_TEXT, IGNORE_LONGTEXT, false )
     set_callbacks( Open, Close )
 vlc_module_end ()
 
@@ -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
@@ -465,9 +472,8 @@ fatal:
  *****************************************************************************/
 static int Control( access_t *p_access, int i_query, va_list args )
 {
-    bool   *pb_bool;
-    int          *pi_int;
-    int64_t      *pi_64;
+    bool    *pb_bool;
+    int64_t *pi_64;
 
     switch( i_query )
     {
@@ -485,11 +491,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
             break;
 
         /* */
-        case ACCESS_GET_MTU:
-            pi_int = (int*)va_arg( args, int * );
-            *pi_int = 0;
-            break;
-
         case ACCESS_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
             *pi_64 = DEFAULT_PTS_DELAY * 1000;