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
e19d5f53
Commit
e19d5f53
authored
Nov 09, 2011
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
blurayOpen(): factorize error case
parent
a16e34d7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
26 deletions
+22
-26
modules/access/bluray.c
modules/access/bluray.c
+22
-26
No files found.
modules/access/bluray.c
View file @
e19d5f53
...
...
@@ -95,6 +95,7 @@ static int blurayOpen( vlc_object_t *object )
char
*
pos_title
;
int
i_title
=
-
1
;
char
bd_path
[
PATH_MAX
];
const
char
*
error_msg
=
NULL
;
if
(
strcmp
(
p_demux
->
psz_access
,
"bluray"
))
{
// TODO BDMV support, once we figure out what to do in libbluray
...
...
@@ -136,43 +137,34 @@ static int blurayOpen( vlc_object_t *object )
/* AACS */
if
(
disc_info
->
aacs_detected
)
{
if
(
!
disc_info
->
libaacs_detected
)
{
dialog_Fatal
(
p_demux
,
_
(
"Blu-Ray error"
),
_
(
"This Blu-Ray Disc needs a library for AACS decoding, "
"and your system does not have it."
));
blurayClose
(
object
);
return
VLC_EGENERIC
;
error_msg
=
_
(
"This Blu-Ray Disc needs a library for AACS decoding, "
"and your system does not have it."
);
goto
error
;
}
if
(
!
disc_info
->
aacs_handled
)
{
dialog_Fatal
(
p_demux
,
_
(
"Blu-Ray error"
),
_
(
"Your system AACS decoding library does not work. "
"Missing keys?"
));
blurayClose
(
object
);
return
VLC_EGENERIC
;
error_msg
=
_
(
"Your system AACS decoding library does not work. "
"Missing keys?"
);
goto
error
;
}
}
/* BD+ */
if
(
disc_info
->
bdplus_detected
)
{
if
(
!
disc_info
->
libbdplus_detected
)
{
dialog_Fatal
(
p_demux
,
_
(
"Blu-Ray error"
),
_
(
"This Blu-Ray Disc needs a library for BD+ decoding, "
"and your system does not have it."
));
blurayClose
(
object
);
return
VLC_EGENERIC
;
error_msg
=
_
(
"This Blu-Ray Disc needs a library for BD+ decoding, "
"and your system does not have it."
);
goto
error
;
}
if
(
!
disc_info
->
bdplus_handled
)
{
dialog_Fatal
(
p_demux
,
_
(
"Blu-Ray error"
),
_
(
"Your system BD+ decoding library does not work. "
"Missing configuration?"
));
blurayClose
(
object
);
return
VLC_EGENERIC
;
error_msg
=
_
(
"Your system BD+ decoding library does not work. "
"Missing configuration?"
);
goto
error
;
}
}
/* Get titles and chapters */
if
(
blurayInitTitles
(
p_demux
)
!=
VLC_SUCCESS
)
{
blurayClose
(
object
);
return
VLC_EGENERIC
;
goto
error
;
}
/* get title request */
...
...
@@ -185,21 +177,25 @@ static int blurayOpen( vlc_object_t *object )
/* set start title number */
if
(
bluraySetTitle
(
p_demux
,
i_title
)
!=
VLC_SUCCESS
)
{
msg_Err
(
p_demux
,
"Could not set the title %d"
,
i_title
);
blurayClose
(
object
);
return
VLC_EGENERIC
;
goto
error
;
}
p_sys
->
p_parser
=
stream_DemuxNew
(
p_demux
,
"ts"
,
p_demux
->
out
);
if
(
!
p_sys
->
p_parser
)
{
msg_Err
(
p_demux
,
"Failed to create TS demuxer"
);
blurayClose
(
object
);
return
VLC_EGENERIC
;
goto
error
;
}
p_demux
->
pf_control
=
blurayControl
;
p_demux
->
pf_demux
=
blurayDemux
;
return
VLC_SUCCESS
;
error:
if
(
error_msg
)
dialog_Fatal
(
p_demux
,
_
(
"Blu-Ray error"
),
"%s"
,
error_msg
);
blurayClose
(
object
);
return
VLC_EGENERIC
;
}
...
...
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