Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Jean-Baptiste Kempf
libaacs
Commits
a00e2c5e
Commit
a00e2c5e
authored
Sep 19, 2019
by
John Doe
Committed by
Jean-Baptiste Kempf
Jun 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache MEDIA KEY
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
94a06d2c
Pipeline
#18799
failed with stage
in 1 minute and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
src/libaacs/aacs.c
src/libaacs/aacs.c
+12
-0
No files found.
src/libaacs/aacs.c
View file @
a00e2c5e
...
...
@@ -563,6 +563,12 @@ static int _calc_mk(AACS *aacs, uint8_t *mk, pk_list *pkl, dk_list *dkl)
return
AACS_SUCCESS
;
}
/* get cached mk */
if
(
!
aacs
->
no_cache
&&
keycache_find
(
"mk"
,
aacs
->
disc_id
,
mk
,
16
))
{
BD_DEBUG
(
DBG_AACS
,
"Using cached MK
\n
"
);
return
AACS_SUCCESS
;
}
BD_DEBUG
(
DBG_AACS
,
"Calculate media key...
\n
"
);
mkb
=
_mkb_open
(
aacs
);
...
...
@@ -589,6 +595,12 @@ static int _calc_mk(AACS *aacs, uint8_t *mk, pk_list *pkl, dk_list *dkl)
if
(
result
==
AACS_SUCCESS
)
{
memcpy
(
aacs
->
mk
,
mk
,
sizeof
(
aacs
->
mk
));
/* cache mk */
if
(
!
aacs
->
no_cache
)
{
if
(
memcmp
(
aacs
->
disc_id
,
empty_key
,
sizeof
(
aacs
->
disc_id
)))
{
keycache_save
(
"mk"
,
aacs
->
disc_id
,
mk
,
16
);
}
}
}
mkb_close
(
mkb
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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