Skip to content
Snippets Groups Projects
Commit 02b784c0 authored by Petri Hintukainen's avatar Petri Hintukainen Committed by Hugo Beauzée-Luyssen
Browse files

access: libdvdread 6.1.2 supports UTF-8 paths in Windows.


(cherry picked from commit 262b5460)
Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent e30973a4
No related branches found
No related tags found
No related merge requests found
......@@ -371,7 +371,14 @@ static int AccessDemuxOpen ( vlc_object_t *p_this )
goto bailout;
/* Open dvdnav */
#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2)
/* In libdvdread prior to 6.1.2, UTF8 is not supported for windows and
* requires a prior conversion.
* For non win32/os2 platforms, this is just a no-op */
psz_path = ToLocale( psz_file );
#else
psz_path = psz_file;
#endif
#if DVDNAV_VERSION >= 60100
dvdnav_logger_cb cbs;
cbs.pf_log = DvdNavLog;
......@@ -390,8 +397,10 @@ static int AccessDemuxOpen ( vlc_object_t *p_this )
bailout:
free( psz_file );
#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2)
if( psz_path )
LocaleFree( psz_path );
#endif
return i_ret;
}
......
......@@ -212,7 +212,14 @@ static int Open( vlc_object_t *p_this )
}
/* Open dvdread */
#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2)
/* In libdvdread prior to 6.1.2, UTF8 is not supported for windows and
* requires a prior conversion.
* For non win32/os2 platforms, this is just a no-op */
const char *psz_path = ToLocale( psz_file );
#else
const char *psz_path = psz_file;
#endif
#if DVDREAD_VERSION >= DVDREAD_VERSION_CODE(6, 1, 0)
dvd_logger_cb cbs;
cbs.pf_log = DvdReadLog;
......@@ -220,7 +227,9 @@ static int Open( vlc_object_t *p_this )
#else
dvd_reader_t *p_dvdread = DVDOpen( psz_path );
#endif
#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2)
LocaleFree( psz_path );
#endif
if( p_dvdread == NULL )
{
msg_Err( p_demux, "DVDRead cannot open source: %s", psz_file );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment