]> git.sesse.net Git - vlc/blobdiff - src/win32/specific.c
Use var_Inherit* instead of var_CreateGet*.
[vlc] / src / win32 / specific.c
index e362e273b29263b3d6313d7982ef8317de9c599a..531e29271a6fc4dcecab4de3654ad79ddc9c2935 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * specific.c: Win32 specific initilization
  *****************************************************************************
- * Copyright (C) 2001-2004 the VideoLAN team
+ * Copyright (C) 2001-2004, 2010 the VideoLAN team
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Gildas Bazin <gbazin@videolan.org>
@@ -29,6 +29,7 @@
 #include <vlc_common.h>
 #include "../libvlc.h"
 #include <vlc_playlist.h>
+#include <vlc_url.h>
 
 #include "../config/vlc_getopt.h"
 
@@ -344,20 +345,23 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
 
                 /* Count the input options */
                 while( i_opt + i_options + 1 < i_argc &&
-                       *ppsz_argv[ i_opt + i_options + 1 ] == ':' )
+                        *ppsz_argv[ i_opt + i_options + 1 ] == ':' )
                 {
                     i_options++;
                 }
-                playlist_AddExt( p_playlist, ppsz_argv[i_opt],
-                  NULL, PLAYLIST_APPEND |
+
+                char *psz_URI = make_URI( ppsz_argv[i_opt], NULL );
+                playlist_AddExt( p_playlist, psz_URI,
+                        NULL, PLAYLIST_APPEND |
                         ( ( i_opt || p_data->enqueue ) ? 0 : PLAYLIST_GO ),
-                  PLAYLIST_END, -1,
-                  i_options,
-                  (char const **)( i_options ? &ppsz_argv[i_opt+1] : NULL ),
-                  VLC_INPUT_OPTION_TRUSTED,
-                  true, pl_Unlocked );
+                        PLAYLIST_END, -1,
+                        i_options,
+                        (char const **)( i_options ? &ppsz_argv[i_opt+1] : NULL ),
+                        VLC_INPUT_OPTION_TRUSTED,
+                        true, pl_Unlocked );
 
                 i_opt += i_options;
+                free( psz_URI );
             }
 
             free( ppsz_argv );