summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rbcodec/dsp/pbe.c3
-rw-r--r--lib/rbcodec/dsp/surround.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/rbcodec/dsp/pbe.c b/lib/rbcodec/dsp/pbe.c
index 28cdbb2..3656f68 100644
--- a/lib/rbcodec/dsp/pbe.c
+++ b/lib/rbcodec/dsp/pbe.c
@@ -80,7 +80,8 @@ static void dsp_pbe_flush(void)
return; /* Not currently enabled */
unsigned int total_len = (B0_SIZE + B2_SIZE + B3_SIZE) * 2;
- memset(core_get_data(handle),0,sizeof(int32_t) * total_len);
+ if (handle > 0)
+ memset(core_get_data(handle),0,sizeof(int32_t) * total_len);
b0_r[0] = 0; b0_w[0] = 0;
b0_r[1] = 0; b0_w[1] = 0;
b2_r[0] = 0; b2_w[0] = 0;
diff --git a/lib/rbcodec/dsp/surround.c b/lib/rbcodec/dsp/surround.c
index 26d12b1..b2995de 100644
--- a/lib/rbcodec/dsp/surround.c
+++ b/lib/rbcodec/dsp/surround.c
@@ -97,7 +97,8 @@ static void dsp_surround_flush(void)
return;
unsigned int total_len = B0_DLY + B2_DLY + BB_DLY + HH_DLY + CL_DLY;
- memset(core_get_data(handle),0,sizeof(int32_t) * total_len);
+ if (handle > 0)
+ memset(core_get_data(handle),0,sizeof(int32_t) * total_len);
}
static void surround_update_filter(unsigned int fout)