shithub: libdvdcss

Download patch

ref: 061ebba29b2c295d9a2c160077293e09ddd96c19
parent: 0a1535afb01a0b39b678575c509c91695bff0f06
author: Håkan Hjort <d95hjort@dtek.chalmers.se>
date: Sat Mar 9 12:24:28 EST 2002

Tell libdvdcss to get the key for the block before we decrypt it.


--- a/test/test.c
+++ b/test/test.c
@@ -66,7 +66,8 @@
     if( IsSectorScrambled( p_buffer ) )
     {
         /* Set the file descriptor position to the previous location */
-        dvdcss_seek( dvdcss, i_sector, DVDCSS_NOFLAGS );
+        /* ... and get the appropriate key for this sector */
+        dvdcss_seek( dvdcss, i_sector, DVDCSS_SEEK_KEY );
 
         /* Read sector again, and decrypt it on the fly */
         dvdcss_read( dvdcss, p_buffer, 1, DVDCSS_READ_DECRYPT );