summaryrefslogtreecommitdiffstats
path: root/libdvdcss/libdvdcss.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-08-01 13:52:17 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:14:46 +0200
commit2fadc18008ab7ec7747b1774a60c93e560ab9001 (patch)
tree090aeb1074ca55ad6eb5dcee502e25e459bd0ec8 /libdvdcss/libdvdcss.c
parent21a35506636d09daa2367091762cc50ca65cf5a5 (diff)
downloadmpv-2fadc18008ab7ec7747b1774a60c93e560ab9001.tar.bz2
mpv-2fadc18008ab7ec7747b1774a60c93e560ab9001.tar.xz
dvdcss: Handle failing ioctls more gracefully
Also set b_scrambled and b_ioctls in the dvdcss_test function instead of both in and outside it and in case of b_scrambled forgetting to set it half of the time. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31883 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libdvdcss/libdvdcss.c')
-rw-r--r--libdvdcss/libdvdcss.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/libdvdcss/libdvdcss.c b/libdvdcss/libdvdcss.c
index d13d0c9a4d..e3b60e1fe2 100644
--- a/libdvdcss/libdvdcss.c
+++ b/libdvdcss/libdvdcss.c
@@ -366,27 +366,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
if( dvdcss->b_ioctls )
{
- i_ret = _dvdcss_test( dvdcss );
-
- if( i_ret == -3 )
- {
- print_debug( dvdcss, "scrambled disc on a region-free RPC-II "
- "drive: possible failure, but continuing "
- "anyway" );
- }
- else if( i_ret < 0 )
- {
- /* Disable the CSS ioctls and hope that it works? */
- print_debug( dvdcss,
- "could not check whether the disc was scrambled" );
- dvdcss->b_ioctls = 0;
- }
- else
- {
- print_debug( dvdcss, i_ret ? "disc is scrambled"
- : "disc is unscrambled" );
- dvdcss->b_scrambled = i_ret;
- }
+ _dvdcss_test( dvdcss );
}
/* If disc is CSS protected and the ioctls work, authenticate the drive */