Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
libdvdcss
Commits
6cd5094c
Commit
6cd5094c
authored
May 13, 2009
by
Sam Hocevar
Browse files
Add support for the DVDCSS_IGNORE_RPC environment variable in order to
bypass our new RPC-II sanity check.
parent
e02b6b39
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/libdvdcss.c
View file @
6cd5094c
...
@@ -91,6 +91,13 @@
...
@@ -91,6 +91,13 @@
* will use the default value which is "${HOME}/.dvdcss/" under Unix and
* will use the default value which is "${HOME}/.dvdcss/" under Unix and
* "C:\Documents and Settings\$USER\Application Data\dvdcss\" under Win32.
* "C:\Documents and Settings\$USER\Application Data\dvdcss\" under Win32.
* The special value "off" disables caching.
* The special value "off" disables caching.
*
* \li \b DVDCSS_IGNORE_RPC: by default, libdvdcss will refuse to access
* a scrambled disc if the drive reports itself as RPC-II with no
* region set, because such drives are designed to prevent access to
* both the decryption key and the DVD data, rendering any decryption
* method useless. Setting this environment variable to \c 1 will
* bypass this check and try to access the drive anyway.
*/
*/
/*
/*
...
@@ -169,6 +176,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
...
@@ -169,6 +176,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
#if !defined(WIN32) && !defined(SYS_OS2)
#if !defined(WIN32) && !defined(SYS_OS2)
char
*
psz_raw_device
=
getenv
(
"DVDCSS_RAW_DEVICE"
);
char
*
psz_raw_device
=
getenv
(
"DVDCSS_RAW_DEVICE"
);
#endif
#endif
char
*
psz_ignore_rpc
=
getenv
(
"DVDCSS_IGNORE_RPC"
);
dvdcss_t
dvdcss
;
dvdcss_t
dvdcss
;
...
@@ -194,6 +202,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
...
@@ -194,6 +202,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
dvdcss
->
psz_cachefile
[
0
]
=
'\0'
;
dvdcss
->
psz_cachefile
[
0
]
=
'\0'
;
dvdcss
->
b_debug
=
0
;
dvdcss
->
b_debug
=
0
;
dvdcss
->
b_errors
=
0
;
dvdcss
->
b_errors
=
0
;
dvdcss
->
b_ignore_rpc
=
0
;
/*
/*
* Find verbosity from DVDCSS_VERBOSE environment variable
* Find verbosity from DVDCSS_VERBOSE environment variable
...
@@ -363,11 +372,13 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
...
@@ -363,11 +372,13 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
dvdcss
->
b_scrambled
=
1
;
/* Assume the worst */
dvdcss
->
b_scrambled
=
1
;
/* Assume the worst */
dvdcss
->
b_ioctls
=
_dvdcss_use_ioctls
(
dvdcss
);
dvdcss
->
b_ioctls
=
_dvdcss_use_ioctls
(
dvdcss
);
dvdcss
->
b_ignore_rpc
=
psz_ignore_rpc
?
atoi
(
psz_ignore_rpc
)
:
0
;
if
(
dvdcss
->
b_ioctls
)
if
(
dvdcss
->
b_ioctls
)
{
{
i_ret
=
_dvdcss_test
(
dvdcss
);
i_ret
=
_dvdcss_test
(
dvdcss
);
if
(
i_ret
==
-
2
)
if
(
i_ret
==
-
2
&&
!
dvdcss
->
b_ignore_rpc
)
{
{
/* Scrambled disk, RPC-II drive, no region set: bail out */
/* Scrambled disk, RPC-II drive, no region set: bail out */
free
(
dvdcss
->
psz_device
);
free
(
dvdcss
->
psz_device
);
...
...
src/libdvdcss.h
View file @
6cd5094c
...
@@ -45,6 +45,7 @@ struct dvdcss_s
...
@@ -45,6 +45,7 @@ struct dvdcss_s
css_t
css
;
css_t
css
;
int
b_ioctls
;
int
b_ioctls
;
int
b_scrambled
;
int
b_scrambled
;
int
b_ignore_rpc
;
dvd_title_t
*
p_titles
;
dvd_title_t
*
p_titles
;
/* Key cache directory and pointer to the filename */
/* Key cache directory and pointer to the filename */
...
...
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