Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
140a43f3
Commit
140a43f3
authored
Oct 08, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dvdread: clean up path handling and fix error message encoding
Paths given to msg_*() function must be
UTF-8
, not local.
parent
c56850aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
15 deletions
+22
-15
modules/access/dvdread.c
modules/access/dvdread.c
+22
-15
No files found.
modules/access/dvdread.c
View file @
140a43f3
...
@@ -164,8 +164,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -164,8 +164,7 @@ static int Open( vlc_object_t *p_this )
{
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_sys_t
*
p_sys
;
demux_sys_t
*
p_sys
;
char
*
psz_name
;
char
*
psz_file
;
dvd_reader_t
*
p_dvdread
;
ifo_handle_t
*
p_vmg_file
;
ifo_handle_t
*
p_vmg_file
;
if
(
!
p_demux
->
psz_file
||
!*
p_demux
->
psz_file
)
if
(
!
p_demux
->
psz_file
||
!*
p_demux
->
psz_file
)
...
@@ -174,30 +173,38 @@ static int Open( vlc_object_t *p_this )
...
@@ -174,30 +173,38 @@ static int Open( vlc_object_t *p_this )
if
(
!
p_demux
->
psz_access
||
!*
p_demux
->
psz_access
)
if
(
!
p_demux
->
psz_access
||
!*
p_demux
->
psz_access
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
psz_name
=
var_CreateGetString
(
p_this
,
"dvd"
);
psz_file
=
var_InheritString
(
p_this
,
"dvd"
);
if
(
!
psz_name
)
{
psz_name
=
strdup
(
""
);
}
}
}
else
else
psz_
name
=
ToLocaleD
up
(
p_demux
->
psz_file
);
psz_
file
=
strd
up
(
p_demux
->
psz_file
);
#ifdef WIN32
#ifdef WIN32
if
(
psz_name
[
0
]
&&
psz_name
[
1
]
==
':'
&&
if
(
psz_file
!=
NULL
)
psz_name
[
2
]
==
'\\'
&&
psz_name
[
3
]
==
'\0'
)
psz_name
[
2
]
=
'\0'
;
{
size_t
flen
=
strlen
(
psz_file
);
if
(
flen
>
0
&&
psz_file
[
flen
-
1
]
==
'\\'
)
psz_file
[
flen
-
1
]
=
'\0'
;
}
else
psz_file
=
strdup
(
""
);
#endif
#endif
if
(
unlikely
(
psz_file
==
NULL
)
)
return
VLC_EGENERIC
;
/* Open dvdread */
/* Open dvdread */
if
(
!
(
p_dvdread
=
DVDOpen
(
psz_name
))
)
const
char
*
psz_path
=
ToLocale
(
psz_file
);
dvd_reader_t
*
p_dvdread
=
DVDOpen
(
psz_path
);
LocaleFree
(
psz_path
);
if
(
p_dvdread
==
NULL
)
{
{
msg_Err
(
p_demux
,
"DVDRead cannot open source: %s"
,
psz_
nam
e
);
msg_Err
(
p_demux
,
"DVDRead cannot open source: %s"
,
psz_
fil
e
);
dialog_Fatal
(
p_demux
,
_
(
"Playback failure"
),
dialog_Fatal
(
p_demux
,
_
(
"Playback failure"
),
_
(
"DVDRead could not open the disc
\"
%s
\"
."
),
psz_nam
e
);
_
(
"DVDRead could not open the disc
\"
%s
\"
."
),
psz_fil
e
);
free
(
psz_
nam
e
);
free
(
psz_
fil
e
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
free
(
psz_
nam
e
);
free
(
psz_
fil
e
);
/* Ifo allocation & initialisation */
/* Ifo allocation & initialisation */
if
(
!
(
p_vmg_file
=
ifoOpen
(
p_dvdread
,
0
)
)
)
if
(
!
(
p_vmg_file
=
ifoOpen
(
p_dvdread
,
0
)
)
)
...
...
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