Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
c32f5ca0
Commit
c32f5ca0
authored
Nov 04, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use utf8_open
parent
29daf1b1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
42 deletions
+9
-42
modules/access/file.c
modules/access/file.c
+1
-31
modules/access_output/file.c
modules/access_output/file.c
+8
-11
No files found.
modules/access/file.c
View file @
c32f5ca0
...
...
@@ -445,37 +445,7 @@ static int open_file (access_t *p_access, const char *psz_name)
p_access
->
info
.
i_update
|=
INPUT_UPDATE_SIZE
;
fseek
(
p_sys
->
fd
,
0
,
SEEK_SET
);
#else
int
fd
=
-
1
;
# if defined (WIN32)
if
(
GetVersion
()
<
0x80000000
)
{
/* for Windows NT and above */
wchar_t
wpath
[
MAX_PATH
+
1
];
if
(
!
MultiByteToWideChar
(
CP_UTF8
,
0
,
path
,
-
1
,
wpath
,
MAX_PATH
))
{
msg_Err
(
p_access
,
"incorrect file name %s"
,
psz_name
);
return
VLC_EGENERIC
;
}
wpath
[
MAX_PATH
]
=
L'\0'
;
fd
=
_wopen
(
wpath
,
O_NONBLOCK
);
}
else
# endif
{
const
char
*
psz_localname
=
ToLocale
(
path
);
if
(
psz_localname
==
NULL
)
{
msg_Err
(
p_access
,
"incorrect file name %s"
,
psz_name
);
free
(
path
);
return
-
1
;
}
fd
=
open
(
path
,
O_NONBLOCK
/*| O_LARGEFILE*/
);
LocaleFree
(
psz_localname
);
}
free
(
path
);
int
fd
=
utf8_open
(
path
,
O_RDONLY
|
O_NONBLOCK
/* O_LARGEFILE*/
,
0666
);
if
(
fd
==
-
1
)
{
msg_Err
(
p_access
,
"cannot open file %s (%s)"
,
psz_name
,
...
...
modules/access_output/file.c
View file @
c32f5ca0
...
...
@@ -129,10 +129,10 @@ static int Open( vlc_object_t *p_this )
}
else
{
c
har
*
psz_localname
=
ToLocale
(
p_access
->
psz_name
)
;
char
*
psz_tmp
,
*
psz_tmp2
,
*
psz_rewriten
;
int
fd
,
i
,
i_length
=
strlen
(
p
sz_local
name
);
for
(
i
=
0
,
psz_tmp
=
p
sz_local
name
;
c
onst
char
*
psz_tmp
;
char
*
psz_tmp2
,
*
psz_rewriten
;
int
fd
,
i
,
i_length
=
strlen
(
p
_access
->
psz_
name
);
for
(
i
=
0
,
psz_tmp
=
p
_access
->
psz_
name
;
(
psz_tmp
=
strstr
(
psz_tmp
,
"%T"
)
)
;
psz_tmp
++
,
i
++
)
;
if
(
i
)
...
...
@@ -141,7 +141,7 @@ static int Open( vlc_object_t *p_this )
psz_rewriten
=
(
char
*
)
malloc
(
i_length
);
if
(
!
psz_rewriten
)
return
(
VLC_EGENERIC
);
psz_tmp
=
p
sz_local
name
;
psz_tmp
=
p
_access
->
psz_
name
;
psz_tmp2
=
psz_rewriten
;
while
(
*
psz_tmp
)
{
...
...
@@ -156,15 +156,12 @@ static int Open( vlc_object_t *p_this )
*
psz_tmp2
++
=
*
psz_tmp
++
;
}
*
psz_tmp2
=
*
psz_tmp
;
fd
=
open
(
psz_rewriten
,
i_flags
,
0666
);
LocaleFree
(
psz_localname
);
fd
=
utf8_open
(
psz_rewriten
,
i_flags
,
0666
);
free
(
psz_rewriten
);
}
else
{
fd
=
open
(
psz_localname
,
i_flags
,
0666
);
LocaleFree
(
psz_localname
);
}
fd
=
utf8_open
(
p_access
->
psz_name
,
i_flags
,
0666
);
if
(
fd
==
-
1
)
{
msg_Err
(
p_access
,
"cannot open `%s' (%s)"
,
p_access
->
psz_name
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment