Commit c25df626 authored by cRTrn13's avatar cRTrn13

Ditto

parent 2f64c0ef
......@@ -21,10 +21,8 @@ BLURAY *bd_open(const char* device_path, const char* keyfile_path)
if ((bd->h_libaacs = dlopen("libaacs.so", RTLD_LAZY))) {
DEBUG(DBG_BLURAY, "Downloaded libaacs (0x%08x)\n", bd->h_libaacs);
// typedef AACS_KEYS* (*fptr)();
fptr_p_void fptr_s = dlsym(bd->h_libaacs, "aacs_open");
bd->aacs = fptr_s(device_path, keyfile_path);
fptr_p_void fptr = dlsym(bd->h_libaacs, "aacs_open");
bd->aacs = fptr(device_path, keyfile_path);
} else {
DEBUG(DBG_BLURAY, "libaacs not present\n");
}
......@@ -45,10 +43,8 @@ BLURAY *bd_open(const char* device_path, const char* keyfile_path)
void bd_close(BLURAY *bd)
{
if (bd->h_libaacs) {
typedef void* (*fptr)();
fptr fptr_s = dlsym(bd->h_libaacs, "aacs_close");
fptr_s(bd->aacs);
fptr_p_void fptr = dlsym(bd->h_libaacs, "aacs_close");
fptr(bd->aacs);
dlclose(bd->h_libaacs);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment