libldac-dec: fix decoder initialization failure (#502690)

This commit is contained in:
K900
2026-03-23 16:01:46 +00:00
committed by GitHub
2 changed files with 29 additions and 0 deletions
@@ -0,0 +1,24 @@
--- a/src/ldacBT_api.o.c
+++ b/src/ldacBT_api.o.c
@@ -165,6 +165,10 @@
// tbl_ldacbt_config[0].frmlen_1ch;
// frmlen = 165 * channel - LDACBT_FRMHDRBYTES;
frmlen = tbl_ldacbt_config[0].frmlen_1ch * channel - LDACBT_FRMHDRBYTES;
+ hLdacBT->frmlen = frmlen;
+ hLdacBT->cm = cm;
+ hLdacBT->cci = cci;
+ hLdacBT->frm_status = 0;
/* Set Configuration Information */
result = ldaclib_set_config_info(
hLdacBT->hLDAC, hLdacBT->sfid, hLdacBT->cci, hLdacBT->frmlen, hLdacBT->frm_status);
@@ -174,10 +178,6 @@
} else if (result != LDAC_S_OK) {
hLdacBT->error_code_api = LDACBT_GET_LDACLIB_ERROR_CODE;
}
- hLdacBT->frmlen = frmlen;
- hLdacBT->cm = cm;
- hLdacBT->cci = cci;
- hLdacBT->frm_status = 0;
hLdacBT->sfid = sfid;
result = ldaclib_init_decode(hLdacBT->hLDAC, nshift);
if (LDAC_FAILED(result)) {
+5
View File
@@ -17,6 +17,11 @@ stdenv.mkDerivation {
hash = "sha256-pdeEtQXxL2pd9qTfLOEmPDn3POgo5qxRqbK807WN98s=";
};
patches = [
# Fix uninitialized struct members passed to ldaclib_set_config_info in decode init
./fix-decode-init.patch
];
nativeBuildInputs = [ cmake ];
# Upstream CMakeLists.txt doesn't have install rules