Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libdvdcss
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Code
Merge requests
3
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
libdvdcss
Merge requests
!5
Fix opening non-ASCII paths in Windows
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix opening non-ASCII paths in Windows
hpi/libdvdcss:win32-open-fix
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Petri Hintukainen
requested to merge
hpi/libdvdcss:win32-open-fix
into
master
4 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
17ec0256
1 commit,
4 years ago
1 file
+
19
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/device.c
+
19
−
0
Options
@@ -63,6 +63,10 @@
# include <fcntl.h>
/* O_BINARY */
#endif
#ifdef _WIN32
# include <windows.h>
#endif
#include
"dvdcss/dvdcss.h"
#include
"common.h"
@@ -442,7 +446,22 @@ int dvdcss_close_device ( dvdcss_t dvdcss )
*****************************************************************************/
static
int
libc_open
(
dvdcss_t
dvdcss
,
const
char
*
psz_device
)
{
#ifdef _WIN32
int
wlen
;
dvdcss
->
i_fd
=
-
1
;
wlen
=
MultiByteToWideChar
(
CP_UTF8
,
0
,
psz_device
,
-
1
,
NULL
,
0
);
if
(
wlen
>
0
)
{
wchar_t
*
wpath
=
(
wchar_t
*
)
malloc
(
sizeof
(
wchar_t
)
*
wlen
);
if
(
wpath
)
{
if
(
MultiByteToWideChar
(
CP_UTF8
,
0
,
psz_device
,
-
1
,
wpath
,
wlen
)
)
{
dvdcss
->
i_fd
=
_wopen
(
wpath
,
O_BINARY
);
}
free
(
wpath
);
}
}
#else
dvdcss
->
i_fd
=
open
(
psz_device
,
O_BINARY
);
#endif
if
(
dvdcss
->
i_fd
==
-
1
)
{
Loading