Hello,
@
afedchin: Thank you for the hint!
After some problems debugging worked and i think i found the Problem.
Kodi is using libblurays "
bd_open_files" since "Merge pull request #12339 from ace20022/bd_files" (ID 45acc104aab57e7d7161f88640269f1178909d2e).
When playing a bluray disc the variable "root" contains the path to the drive (e.g. "E:") and is casted to a pointer to the string. This is then used
here in the struct "fs" and given to
_bd_open. In this function the device_path is NULL and later on in
disc_open, when initializing the
decryption, the path in the struct "dev" is also NULL. This continous
here to
libaacs_open and
there the function "aacs_open_device" of libaacs in libmmbd is called.
The
source code for libmmbd shows it does some small checks and calls mmbd_open in mmbd.cpp:
cpp:
MMBD_PUBLIC int __cdecl mmbd_open(MMBD *mmbd,const char *locator)
{
if (mmbd==NULL) return -1;
const char* prefix = NULL;
size_t len = strlen(locator);
if ((len>5) && (memcmp(locator,"/dev/",5)==0) ) {
prefix="dev:";
}
return ((CMMBDConn*)mmbd)->open(prefix,locator);
}
Line 6 leads to the exception as "locator" is NULL. This is also seen
here. The original libaacs checks the variable and is able to handle a NULL value for the path.
I tried to find some documentation for libbluray and libaacs if this is defined behaviour or not but could not find an answer. Does anybody have an idea how this could be fixed? Are we able to fix this in kodi or is a fix needed in libmmbd?
With regards
Joniw