Commit 262b5460 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.

parent 979bca40
......@@ -420,7 +420,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 = { .pf_log = DvdNavLog };
if( dvdnav_open2( &p_dvdnav, p_demux, &cbs, psz_path ) != DVDNAV_STATUS_OK )
......@@ -438,8 +445,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;
}
......
......@@ -202,14 +202,23 @@ 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 = { .pf_log = DvdReadLog };
dvd_reader_t *p_dvdread = DVDOpen2( p_demux, &cbs, psz_path );
#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 );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment