[MPlayer-cvslog] r31926 - trunk/stream/stream_bd.c

reimar subversion at mplayerhq.hu
Wed Aug 4 15:39:10 CEST 2010


Author: reimar
Date: Wed Aug  4 15:39:10 2010
New Revision: 31926

Log:
Move one AES initialization out of inner loop.

Modified:
   trunk/stream/stream_bd.c

Modified: trunk/stream/stream_bd.c
==============================================================================
--- trunk/stream/stream_bd.c	Wed Aug  4 15:32:20 2010	(r31925)
+++ trunk/stream/stream_bd.c	Wed Aug  4 15:39:10 2010	(r31926)
@@ -271,9 +271,6 @@ static off_t bd_read(struct bd_priv *bd,
         key enc_seed;
         bd->iv = BD_CBC_IV;
 
-        // set up AES key from uk and seed
-        av_aes_init(bd->aeseed, bd->uks.keys[0].u8, 128, 0);
-
         // perform encryption of first 16 bytes of unit (seed)
         av_aes_crypt(bd->aeseed, enc_seed.u8, buf, 1, NULL, 0);
 
@@ -340,6 +337,9 @@ static int bd_stream_open(stream_t *s, i
     bd->aescbc = av_malloc(av_aes_size);
     bd->aeseed = av_malloc(av_aes_size);
 
+    // set up AES key from uk
+    av_aes_init(bd->aeseed, bd->uks.keys[0].u8, 128, 0);
+
     snprintf(filename, sizeof(filename), BD_M2TS_PATH, bd->device, bd->title);
     mp_msg(MSGT_OPEN, MSGL_STATUS, "Opening %s\n", filename);
     bd->title_file = fopen(filename, "rb");


More information about the MPlayer-cvslog mailing list