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
d7892111
Commit
d7892111
authored
Mar 14, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert from locale before passing to LibVLC - closes #838
parent
ab8bf7fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
src/vlc.c
src/vlc.c
+18
-5
No files found.
src/vlc.c
View file @
d7892111
...
...
@@ -32,6 +32,10 @@
#include <stdlib.h>
/* putenv(), strtol(), */
#include <locale.h>
/* Explicit HACK */
extern
void
LocaleFree
(
const
char
*
);
extern
char
*
FromLocale
(
const
char
*
);
/*****************************************************************************
* Local prototypes.
...
...
@@ -89,7 +93,7 @@ int main( int i_argc, char *ppsz_argv[] )
i_ret
=
VLC_Create
();
if
(
i_ret
<
0
)
{
return
i_ret
;
return
-
i_ret
;
}
#if !defined(WIN32) && !defined(UNDER_CE)
...
...
@@ -143,7 +147,7 @@ int main( int i_argc, char *ppsz_argv[] )
else
{
/* failed!, quit */
return
-
1
;
return
1
;
}
}
else
...
...
@@ -154,18 +158,24 @@ int main( int i_argc, char *ppsz_argv[] )
else
{
/* failed!, quit */
return
-
1
;
return
1
;
}
}
}
else
#endif
{
for
(
int
i
=
0
;
i
<
i_argc
;
i
++
)
if
((
ppsz_argv
[
i
]
=
FromLocale
(
ppsz_argv
[
i
]))
==
NULL
)
return
1
;
// BOOM!
}
/* Initialize libvlc */
i_ret
=
VLC_Init
(
0
,
i_argc
,
ppsz_argv
);
if
(
i_ret
<
0
)
{
VLC_Destroy
(
0
);
return
i_ret
==
VLC_EEXITSUCCESS
?
0
:
i_ret
;
return
i_ret
==
VLC_EEXITSUCCESS
?
0
:
-
i_ret
;
}
i_ret
=
VLC_AddIntf
(
0
,
NULL
,
VLC_TRUE
,
VLC_TRUE
);
...
...
@@ -178,6 +188,9 @@ int main( int i_argc, char *ppsz_argv[] )
/* Destroy the libvlc structure */
VLC_Destroy
(
0
);
for
(
int
i
=
0
;
i
<
i_argc
;
i
++
)
LocaleFree
(
ppsz_argv
[
i
]);
#if !defined(WIN32) && !defined(UNDER_CE)
pthread_cancel
(
sigth
);
# ifdef __APPLE__
...
...
@@ -189,7 +202,7 @@ int main( int i_argc, char *ppsz_argv[] )
pthread_join
(
sigth
,
NULL
);
#endif
return
i_ret
;
return
-
i_ret
;
}
#if !defined(WIN32) && !defined(UNDER_CE)
...
...
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