Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
ad505d55
Commit
ad505d55
authored
Nov 10, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't rely on an object in fix_readdir_charset
parent
378c8bed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
src/misc/charset.c
src/misc/charset.c
+7
-11
No files found.
src/misc/charset.c
View file @
ad505d55
...
...
@@ -342,8 +342,12 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
char
*
__vlc_fix_readdir_charset
(
vlc_object_t
*
p_this
,
const
char
*
psz_string
)
{
(
void
)
p_this
;
#ifdef __APPLE__
if
(
p_this
->
p_libvlc_global
->
iconv_macosx
!=
(
vlc_iconv_t
)
-
1
)
vlc_iconv_t
hd
=
vlc_iconv_open
(
"UTF-8"
,
"UTF-8-MAC"
);
if
(
hd
!=
(
vlc_iconv_t
)(
-
1
))
{
const
char
*
psz_in
=
psz_string
;
size_t
i_in
=
strlen
(
psz_in
);
...
...
@@ -351,15 +355,9 @@ char *__vlc_fix_readdir_charset( vlc_object_t *p_this, const char *psz_string )
char
*
psz_utf8
=
malloc
(
i_out
+
1
);
char
*
psz_out
=
psz_utf8
;
vlc_mutex_lock
(
&
p_this
->
p_libvlc_global
->
iconv_lock
);
size_t
i_ret
=
vlc_iconv
(
p_this
->
p_libvlc_global
->
iconv_macosx
,
&
psz_in
,
&
i_in
,
&
psz_out
,
&
i_out
);
vlc_mutex_unlock
(
&
p_this
->
p_libvlc_global
->
iconv_lock
);
if
(
i_ret
==
(
size_t
)
-
1
||
i_in
)
size_t
i_ret
=
vlc_iconv
(
hd
,
&
psz_in
,
&
i_in
,
&
psz_out
,
&
i_out
);
if
(
i_ret
==
(
size_t
)(
-
1
)
||
i_in
)
{
msg_Warn
(
p_this
,
"failed to convert
\"
%s
\"
from HFS+ charset (%s)"
,
psz_string
,
strerror
(
errno
)
);
free
(
psz_utf8
);
return
strdup
(
psz_string
);
}
...
...
@@ -368,8 +366,6 @@ char *__vlc_fix_readdir_charset( vlc_object_t *p_this, const char *psz_string )
return
psz_utf8
;
}
#endif
(
void
)
p_this
;
return
strdup
(
psz_string
);
}
...
...
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