[vlc-devel] commit: Disc reading libs want ANSI rather than UTF-8 paths - fixes #1560 ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Apr 30 19:04:24 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Wed Apr 30 20:04:59 2008 +0300| [8aa3a9c40e88ea93c10cc3de46005f896fd126f1]

Disc reading libs want ANSI rather than UTF-8 paths - fixes #1560

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8aa3a9c40e88ea93c10cc3de46005f896fd126f1
---

 modules/access/cdda.c        |    3 ++-
 modules/access/dvdnav.c      |    3 ++-
 modules/access/dvdread.c     |    3 ++-
 modules/access/vcd/vcd.c     |    2 +-
 modules/access/vcdx/access.c |    3 ++-
 modules/access/vcdx/vcd.c    |    1 +
 6 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/modules/access/cdda.c b/modules/access/cdda.c
index 2735bd9..13c3f33 100644
--- a/modules/access/cdda.c
+++ b/modules/access/cdda.c
@@ -40,6 +40,7 @@
 #include <vlc_input.h>
 #include <vlc_access.h>
 #include <vlc_meta.h>
+#include <vlc_charset.h>
 
 #include <vlc_codecs.h> /* For WAVEHEADER */
 #include "vcd/cdrom.h"
@@ -158,7 +159,7 @@ static int Open( vlc_object_t *p_this )
             return VLC_EGENERIC;
         }
     }
-    else psz_name = strdup( p_access->psz_path );
+    else psz_name = ToLocaleDup( p_access->psz_path );
 
 #ifdef WIN32
     if( psz_name[0] && psz_name[1] == ':' &&
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index f9df8aa..0fbce33 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -33,6 +33,7 @@
 #include <vlc_input.h>
 #include <vlc_access.h>
 #include <vlc_demux.h>
+#include <vlc_charset.h>
 
 #include <vlc_interface.h>
 
@@ -189,7 +190,7 @@ static int Open( vlc_object_t *p_this )
         }
     }
     else
-        psz_name = strdup( p_demux->psz_path );
+        psz_name = ToLocaleDup( p_demux->psz_path );
 
 #ifdef WIN32
     if( psz_name[0] && psz_name[1] == ':' &&
diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c
index f6cfad6..41774d1 100644
--- a/modules/access/dvdread.c
+++ b/modules/access/dvdread.c
@@ -33,6 +33,7 @@
 #include <vlc/vlc.h>
 #include <vlc_input.h>
 #include <vlc_access.h>
+#include <vlc_charset.h>
 
 #include <vlc_interface.h>
 
@@ -203,7 +204,7 @@ static int Open( vlc_object_t *p_this )
         }
     }
     else
-        psz_name = strdup( p_demux->psz_path );
+        psz_name = ToLocaleDup( p_demux->psz_path );
 
 #ifdef WIN32
     if( psz_name[0] && psz_name[1] == ':' &&
diff --git a/modules/access/vcd/vcd.c b/modules/access/vcd/vcd.c
index 4492cd2..97ef305 100644
--- a/modules/access/vcd/vcd.c
+++ b/modules/access/vcd/vcd.c
@@ -94,7 +94,7 @@ static int Open( vlc_object_t *p_this )
 {
     access_t     *p_access = (access_t *)p_this;
     access_sys_t *p_sys;
-    char *psz_dup = strdup( p_access->psz_path );
+    char *psz_dup = ToLocaleDup( p_access->psz_path );
     char *psz;
     int i_title = 0;
     int i_chapter = 0;
diff --git a/modules/access/vcdx/access.c b/modules/access/vcdx/access.c
index d28ad46..c54d6d1 100644
--- a/modules/access/vcdx/access.c
+++ b/modules/access/vcdx/access.c
@@ -37,6 +37,7 @@
 #include <vlc_interface.h>
 #include <vlc_input.h>
 #include <vlc_access.h>
+#include <vlc_charset.h>
 #include "vlc_keys.h"
 
 #include <cdio/cdio.h>
@@ -759,7 +760,7 @@ vcd_Open( vlc_object_t *p_this, const char *psz_dev )
 
     if( !psz_dev ) return NULL;
 
-    actual_dev=strdup(psz_dev);
+    actual_dev= ToLocaleDup(psz_dev);
     if ( vcdinfo_open(&p_vcdobj, &actual_dev, DRIVER_UNKNOWN, NULL) !=
          VCDINFO_OPEN_VCD) {
       free(actual_dev);
diff --git a/modules/access/vcdx/vcd.c b/modules/access/vcdx/vcd.c
index b89b5e7..83a6d1b 100644
--- a/modules/access/vcdx/vcd.c
+++ b/modules/access/vcdx/vcd.c
@@ -34,6 +34,7 @@
 #endif
 
 #include <vlc/vlc.h>
+#include <vlc_charset.h>
 
 /*****************************************************************************
  * Exported prototypes




More information about the vlc-devel mailing list