[libdvdcss-devel] Remove some commented-out cruft and pointless debug output.
Diego Biurrun
git at videolan.org
Wed Nov 19 00:11:37 CET 2014
libdvdcss | branch: master | Diego Biurrun <diego at biurrun.de> | Mon Nov 17 21:59:38 2014 +0100| [e206559af30267cc1b893c5f177c2ff0ac708445] | committer: Diego Biurrun
Remove some commented-out cruft and pointless debug output.
> http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=e206559af30267cc1b893c5f177c2ff0ac708445
---
src/css.c | 14 +++-----------
test/dvd_region.c | 2 --
2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/src/css.c b/src/css.c
index 3d18372..4043efe 100644
--- a/src/css.c
+++ b/src/css.c
@@ -72,7 +72,7 @@ static void DecryptKey ( uint8_t,
const uint8_t *, const uint8_t *, uint8_t * );
static int DecryptDiscKey ( dvdcss_t, const uint8_t *, dvd_key );
-static int CrackDiscKey ( dvdcss_t, uint8_t * );
+static int CrackDiscKey ( uint8_t * );
static void DecryptTitleKey ( dvd_key, dvd_key );
static int RecoverTitleKey ( int, const uint8_t *,
@@ -403,7 +403,7 @@ int dvdcss_disckey( dvdcss_t dvdcss )
/* Crack Disc key to be able to use it */
memcpy( p_disc_key, p_buffer, DVD_KEY_SIZE );
PrintKey( dvdcss, "cracking disc key ", p_disc_key );
- if( ! CrackDiscKey( dvdcss, p_disc_key ) )
+ if( ! CrackDiscKey( p_disc_key ) )
{
PrintKey( dvdcss, "cracked disc key is ", p_disc_key );
break;
@@ -1164,7 +1164,7 @@ static int investigate( unsigned char *hash, unsigned char *ckey )
return memcmp( key, ckey, DVD_KEY_SIZE );
}
-static int CrackDiscKey( dvdcss_t dvdcss, uint8_t *p_disc_key )
+static int CrackDiscKey( uint8_t *p_disc_key )
{
unsigned char B[5] = { 0,0,0,0,0 }; /* Second Stage of mangle cipher */
unsigned char C[5] = { 0,0,0,0,0 }; /* Output Stage of mangle cipher
@@ -1206,12 +1206,6 @@ static int CrackDiscKey( dvdcss_t dvdcss, uint8_t *p_disc_key )
tmp3 = j ^ tmp2 ^ i; /* C[1] */
tmp4 = K1table[ K1TABLEWIDTH * ( 256 * j + tmp3 ) ]; /* count of entries here */
tmp4++;
-/*
- if( tmp4 == K1TABLEWIDTH )
- {
- print_debug( dvdcss, "Table disaster %d", tmp4 );
- }
-*/
if( tmp4 < K1TABLEWIDTH )
{
K1table[ K1TABLEWIDTH * ( 256 * j + tmp3 ) + tmp4 ] = i;
@@ -1230,8 +1224,6 @@ static int CrackDiscKey( dvdcss_t dvdcss, uint8_t *p_disc_key )
tmp3 = 0;
- print_debug( dvdcss, "initializing the big table" );
-
for( i = 0 ; i < BIGTABLESIZE ; i++ )
{
tmp = (( i + i ) & 0x1fffff0 ) | 0x8 | ( i & 0x7 );
diff --git a/test/dvd_region.c b/test/dvd_region.c
index f35b869..2ab5db3 100644
--- a/test/dvd_region.c
+++ b/test/dvd_region.c
@@ -198,8 +198,6 @@ static int print_region(int fd)
break;
}
- // printf("%d vendor resets available\n", ai->lrpcs.vra);
- // printf("%d user controlled changes available\n", ai->lrpcs.ucca);
printf("Region: ");
if( region_mask)
while(region_mask) {
More information about the libdvdcss-devel
mailing list