Mercurial > mplayer.hg
changeset 31845:678884af8ade
Use the "key" type also for the IV constant.
author | reimar |
---|---|
date | Wed, 04 Aug 2010 13:27:19 +0000 |
parents | 22f2eb79536f |
children | 3f84ee74869d |
files | stream/stream_bd.c |
diffstat | 1 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/stream_bd.c Wed Aug 04 12:38:52 2010 +0000 +++ b/stream/stream_bd.c Wed Aug 04 13:27:19 2010 +0000 @@ -36,11 +36,6 @@ static const char *DEFAULT_BD_DEVICE = "/mnt/bd"; -static const uint8_t BD_CBC_IV[] = { - 0x0b, 0xa0, 0xf8, 0xdd, 0xfe, 0xa6, 0x1f, 0xb3, - 0xd8, 0xdf, 0x9f, 0x56, 0x6a, 0x05, 0x0f, 0x78 -}; - static const struct stream_priv_s { int title; char *device; @@ -72,6 +67,13 @@ uint8_t u8[16]; } key; +static const key BD_CBC_IV = { + .u8 = { + 0x0b, 0xa0, 0xf8, 0xdd, 0xfe, 0xa6, 0x1f, 0xb3, + 0xd8, 0xdf, 0x9f, 0x56, 0x6a, 0x05, 0x0f, 0x78 + } +}; + struct uks { int count; key *keys; @@ -267,7 +269,7 @@ // reset aes context as at start of unit key enc_seed; int i; - memcpy(bd->iv.u8, BD_CBC_IV, sizeof(bd->iv.u8)); + 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);