Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
libdvdcss
Commits
f13b902b
Commit
f13b902b
authored
Oct 24, 2014
by
Diego Biurrun
Browse files
Improve some comments in dvdcss_open() and fix some typos.
parent
2de79ff6
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/css.c
View file @
f13b902b
...
...
@@ -466,7 +466,7 @@ static int dvdcss_titlekey( dvdcss_t dvdcss, int i_pos, dvd_key_t p_title_key )
case
1
:
/* Drive status is OK. */
/* If the title key request failed, but we did not lo
o
se ASF,
/* If the title key request failed, but we did not lose ASF,
* we might still have the AGID. Other code assumes that we
* will not after this so invalidate it(?). */
if
(
i_ret
<
0
)
...
...
src/device.c
View file @
f13b902b
...
...
@@ -372,7 +372,7 @@ int dvdcss_open_device ( dvdcss_t dvdcss )
if
(
psz_device
[
0
]
&&
psz_device
[
1
]
==
':'
&&
(
!
psz_device
[
2
]
||
(
psz_device
[
2
]
==
'\\'
&&
!
psz_device
[
3
]
)
)
)
{
print_debug
(
dvdcss
,
"using OS2 API for access"
);
print_debug
(
dvdcss
,
"using OS
/
2 API for access"
);
dvdcss
->
pf_seek
=
os2_seek
;
dvdcss
->
pf_read
=
os2_read
;
dvdcss
->
pf_readv
=
os2_readv
;
...
...
src/ioctl.c
View file @
f13b902b
...
...
@@ -1528,7 +1528,7 @@ static void QNXInitCPT( CAM_PASS_THRU * p_cpt, int i_type )
/*****************************************************************************
* OS2InitSDC: initialize a SDC structure for the Execute SCSI-command
*****************************************************************************
* This function initializes a OS2 'execute SCSI command' structure for
* This function initializes a
n
OS
/
2 'execute SCSI command' structure for
* future use, either a read command or a write command.
*****************************************************************************/
static
void
OS2InitSDC
(
struct
OS2_ExecSCSICmd
*
p_sdc
,
int
i_type
)
...
...
src/ioctl.h
View file @
f13b902b
...
...
@@ -103,7 +103,7 @@ int ioctl_ReportRPC ( int, int *, int *, int * );
#endif
/*****************************************************************************
* Additional types, OpenBSD
specific
* Additional types, OpenBSD
-
specific
*****************************************************************************/
#if defined( HAVE_OPENBSD_DVD_STRUCT )
typedef
union
dvd_struct
dvd_struct
;
...
...
@@ -137,7 +137,7 @@ typedef union dvd_authinfo dvd_authinfo;
#define DVDCSS_INVALIDATE_AGID 0x3f
/*****************************************************************************
*
w
in32
ioctl
specific
*
W
in32
-
ioctl
-
specific
*****************************************************************************/
#if defined( WIN32 )
...
...
@@ -264,7 +264,7 @@ typedef struct SCSI_PASS_THROUGH_DIRECT
#endif
/* defined( WIN32 ) */
/*****************************************************************************
* OS
2
ioctl
specific
* OS
/2-
ioctl
-
specific
*****************************************************************************/
#if defined( __OS2__ )
...
...
src/libdvdcss.c
View file @
f13b902b
...
...
@@ -160,20 +160,14 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
const
char
*
psz_raw_device
=
getenv
(
"DVDCSS_RAW_DEVICE"
);
#endif
dvdcss_t
dvdcss
;
/*
* Allocate the library structure
*/
dvdcss
=
malloc
(
sizeof
(
struct
dvdcss_s
)
);
/* Allocate the library structure. */
dvdcss_t
dvdcss
=
malloc
(
sizeof
(
struct
dvdcss_s
)
);
if
(
dvdcss
==
NULL
)
{
return
NULL
;
}
/*
* Initialize structure with default values
*/
/* Initialize structure with default values. */
#ifdef DVDCSS_RAW_OPEN
dvdcss
->
i_raw_fd
=
-
1
;
#endif
...
...
@@ -185,9 +179,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
dvdcss
->
b_debug
=
0
;
dvdcss
->
b_errors
=
0
;
/*
* Find verbosity from DVDCSS_VERBOSE environment variable
*/
/* Set library verbosity from DVDCSS_VERBOSE environment variable. */
if
(
psz_verbose
!=
NULL
)
{
int
i
=
atoi
(
psz_verbose
);
...
...
@@ -196,9 +188,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
if
(
i
>=
1
)
dvdcss
->
b_errors
=
1
;
}
/*
* Find method from DVDCSS_METHOD environment variable
*/
/* Set DVD access method from DVDCSS_METHOD environment variable. */
if
(
psz_method
!=
NULL
)
{
if
(
!
strncmp
(
psz_method
,
"key"
,
4
)
)
...
...
@@ -221,9 +211,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
}
}
/*
* If DVDCSS_CACHE was not set, try to guess a default value
*/
/* Set CSS key cache directory. */
if
(
psz_cache
==
NULL
||
psz_cache
[
0
]
==
'\0'
)
{
#if defined(_WIN32_IE) && _WIN32_IE >= 0x500
...
...
@@ -288,9 +276,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
#endif
/* ! defined(_WIN32_IE) && _WIN32_IE >= 0x500 */
}
/*
* Find cache dir from the DVDCSS_CACHE environment variable
*/
/* Sanity check psz_cache value. */
if
(
psz_cache
!=
NULL
)
{
if
(
psz_cache
[
0
]
==
'\0'
||
!
strcmp
(
psz_cache
,
"off"
)
)
...
...
@@ -306,9 +292,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
}
}
/*
* Open device
*/
/* Open device. */
dvdcss_check_device
(
dvdcss
);
i_ret
=
dvdcss_open_device
(
dvdcss
);
if
(
i_ret
<
0
)
...
...
@@ -464,8 +448,8 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
}
}
/* Get disk key, since some discs have
got
same title, manufacturing
* date and serial number, but different keys */
/* Get disk key, since some discs have
the
same title, manufacturing
* date and serial number, but different keys
.
*/
if
(
dvdcss
->
b_scrambled
)
{
psz_key
[
0
]
=
'-'
;
...
...
@@ -516,7 +500,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
}
#endif
/* DVDCSS_RAW_OPEN */
/* Seek
a
t the beginning, just for safety. */
/* Seek t
o
the beginning, just for safety. */
dvdcss
->
pf_seek
(
dvdcss
,
0
);
return
dvdcss
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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