Skip to content

Commit

Permalink
libmythbluray: query VID for libaaacs for libbdplus.
Browse files Browse the repository at this point in the history
Not relevant to the average user at the moment, just keeping up with the lib.
  • Loading branch information
Robert McNamara committed Dec 27, 2010
1 parent cd2bc0a commit a55b7bd
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion mythtv/libs/libmythbluray/bluray.c
Expand Up @@ -544,6 +544,25 @@ static int _libaacs_open(BLURAY *bd, const char *keyfile_path)
return 0;
}

static uint8_t *_libaacs_get_vid(BLURAY *bd)
{
if (bd->aacs) {
#ifdef DLOPEN_CRYPTO_LIBS
fptr_p_void fptr = dl_dlsym(bd->h_libaacs, "aacs_get_vid");
if (fptr) {
return (uint8_t*)fptr(bd->aacs);
}
DEBUG(DBG_BLURAY, "aacs_get_vid() dlsym failed! (%p)", bd);
return NULL;
#else
return aacs_get_vid(bd->aacs);
#endif
}

DEBUG(DBG_BLURAY, "_libaacs_get_vid(): libaacs not initialized! (%p)", bd);
return NULL;
}

static void _libbdplus_close(BLURAY *bd)
{
if (bd->bdplus) {
Expand Down Expand Up @@ -656,7 +675,7 @@ static int _libbdplus_open(BLURAY *bd, const char *keyfile_path)
return 0;
}

bd->bdplus = bd->bdplus_init(bd->device_path, keyfile_path, vid);
bd->bdplus = bd->bdplus_init(bd->device_path, keyfile_path, _libaacs_get_vid(bd) ?: vid);

if (bd->bdplus) {
DEBUG(DBG_BLURAY,"libbdplus initialized\n");
Expand Down

0 comments on commit a55b7bd

Please sign in to comment.