]> git.sesse.net Git - vlc/commitdiff
* Open the .sub file of the vobsubs, with the ToLocale version of the path. Should...
authorDerk-Jan Hartman <hartman@videolan.org>
Sun, 29 Jan 2006 22:11:04 +0000 (22:11 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Sun, 29 Jan 2006 22:11:04 +0000 (22:11 +0000)
modules/demux/vobsub.c

index e82a3570daff837ac6c5729b8903106e9919e6cb..17de7904750ee0cdafcb1f64042596f0b0be2ffd 100644 (file)
@@ -177,8 +177,8 @@ static int Open ( vlc_object_t *p_this )
         }
     }
 
-    i_len = strlen( p_demux->psz_path );
-    psz_vobname = strdup( p_demux->psz_path );
+    psz_vobname = ToLocale( p_demux->psz_path );
+    i_len = strlen( psz_vobname );
 
     strcpy( psz_vobname + i_len - 4, ".sub" );
 
@@ -188,10 +188,10 @@ static int Open ( vlc_object_t *p_this )
         msg_Err( p_demux, "couldn't open .sub Vobsub file: %s",
                  psz_vobname );
         free( p_sys );
-        free( psz_vobname );
+        LocaleFree( psz_vobname );
         return VLC_EGENERIC;
     }
-    free( psz_vobname );
+    LocaleFree( psz_vobname );
 
     return VLC_SUCCESS;
 }