Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
libbluray
Commits
8ce08d0d
Commit
8ce08d0d
authored
Oct 18, 2009
by
cRTrn13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fptr to libaacs unit decryptor in libbluray placed in bluray struct
parent
ee8c2672
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
src/bluray.c
src/bluray.c
+8
-10
No files found.
src/bluray.c
View file @
8ce08d0d
...
...
@@ -10,10 +10,10 @@ BLURAY *bd_open(const char* device_path, const char* keyfile_path)
// open aacs decryptor if present
bd
->
aacs
=
NULL
;
if
((
bd
->
libaacs
_h
=
dlopen
(
"libaacs"
,
RTLD_NOW
)))
{
if
((
bd
->
h_
libaacs
=
dlopen
(
"libaacs"
,
RTLD_NOW
)))
{
typedef
AACS_KEYS
*
(
*
fptr
)();
fptr
fptr_s
=
dlsym
(
bd
->
libaacs
_h
,
"aacs_open"
);
fptr
fptr_s
=
dlsym
(
bd
->
h_
libaacs
,
"aacs_open"
);
bd
->
aacs
=
fptr_s
(
device_path
,
keyfile_path
);
}
...
...
@@ -22,16 +22,16 @@ BLURAY *bd_open(const char* device_path, const char* keyfile_path)
void
bd_close
(
BLURAY
*
bd
)
{
if
(
bd
->
libaacs
_h
)
{
if
(
bd
->
h_
libaacs
)
{
typedef
void
*
(
*
fptr
)();
fptr
fptr_s
=
dlsym
(
bd
->
libaacs
_h
,
"aacs_close"
);
fptr
fptr_s
=
dlsym
(
bd
->
h_
libaacs
,
"aacs_close"
);
fptr_s
(
bd
->
aacs
);
}
X_FREE
(
bd
);
dlclose
(
bd
->
libaacs
_h
);
dlclose
(
bd
->
h_
libaacs
);
}
off_t
bd_seek
(
BLURAY
*
bd
,
off_t
pos
)
...
...
@@ -51,11 +51,9 @@ int bd_read(BLURAY *bd, unsigned char *buf, int len)
int
read
;
if
((
read
=
file_read
(
bd
->
fp
,
buf
,
len
)))
{
if
(
bd
->
libaacs_h
)
{
typedef
int
*
(
*
fptr
)();
fptr
fptr_s
=
dlsym
(
bd
->
libaacs_h
,
"aacs_decrypt_unit"
);
if
(
!
fptr_s
(
bd
->
aacs
,
buf
,
len
))
{
if
(
bd
->
h_libaacs
)
{
bd
->
libaacs_decrypt_unit
=
dlsym
(
bd
->
h_libaacs
,
"aacs_decrypt_unit"
);
if
(
!
bd
->
libaacs_decrypt_unit
(
bd
->
aacs
,
buf
,
len
))
{
return
0
;
}
}
...
...
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