[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: access: libdvdread 6.1.2 supports UTF-8 paths in Windows.

Hugo Beauzée-Luyssen gitlab at videolan.org
Tue Jun 8 12:10:25 UTC 2021



Hugo Beauzée-Luyssen pushed to branch 3.0.x at VideoLAN / VLC


Commits:
02b784c0 by Petri Hintukainen at 2021-06-08T12:01:31+02:00
access: libdvdread 6.1.2 supports UTF-8 paths in Windows.

(cherry picked from commit 262b546066c6fde1458beb467966bbc1972a24d8)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

- - - - -
7516a4f4 by Jean-Baptiste Kempf at 2021-06-08T12:30:49+02:00
iso-639: add iw old code for hebrew for old DVDs

Close #23602

(cherry picked from commit e411f5f993489616229ef9f4a8803ff298c5ea26)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

- - - - -


3 changed files:

- modules/access/dvdnav.c
- modules/access/dvdread.c
- src/text/iso-639_def.h


Changes:

=====================================
modules/access/dvdnav.c
=====================================
@@ -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;
 }
 


=====================================
modules/access/dvdread.c
=====================================
@@ -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 );


=====================================
src/text/iso-639_def.h
=====================================
@@ -99,6 +99,7 @@ static const iso639_lang_t p_languages[] =
     { N_( "Indonesian" ),                     "id", "ind", "ind" },
     { N_( "Inupiaq" ),                        "ik", "ipk", "ipk" },
     { N_( "Italian" ),                        "it", "ita", "ita" },
+    { N_( "Hebrew" ),                         "iw", "heb", "heb" },
     { N_( "Javanese" ),                       "jv", "jaw", "jav" },
     { N_( "Japanese" ),                       "ja", "jpn", "jpn" },
     { N_( "Greenlandic, Kalaallisut" ),       "kl", "kal", "kal" },



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e30973a45e8c4f075cf5a6094f500cd3100665f5...7516a4f4103012f98596cf251d5ee9b5ab00b421

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e30973a45e8c4f075cf5a6094f500cd3100665f5...7516a4f4103012f98596cf251d5ee9b5ab00b421
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list