Commit 5d058953 authored by cRTrn13's avatar cRTrn13

No commit message

No commit message
parent 493551fb
#include <dlfcn.h>
#include <stdio.h>
#include "bluray.h"
#include "util/macro.h"
......@@ -11,15 +12,18 @@ BLURAY *bd_open(const char* device_path, const char* keyfile_path)
bd->aacs = NULL;
bd->h_libaacs = NULL;
bd->fp = NULL;
// open aacs decryptor if present
if ((bd->h_libaacs = dlopen("", RTLD_NOW))) {
if ((bd->h_libaacs = dlopen("", RTLD_LAZY))) {
DEBUG(DBG_BLURAY, "Downloaded libaacs (0x%08x)\n", bd->h_libaacs);
typedef AACS_KEYS* (*fptr)();
fptr fptr_s = dlsym(bd->h_libaacs, "aacs_open");
bd->aacs = fptr_s(device_path, keyfile_path);
} else {
DEBUG(DBG_BLURAY, "libaacs not present\n");
DEBUG(DBG_BLURAY, "BLURAY initialized! (0x%08x)\n", bd);
......@@ -38,7 +42,9 @@ void bd_close(BLURAY *bd)
DEBUG(DBG_BLURAY, "BLURAY closed! (0x%08x)\n", bd);
DEBUG(DBG_BLURAY, "BLURAY destroyed! (0x%08x)\n", bd);
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