summaryrefslogtreecommitdiff
path: root/lib/rbcodec
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec')
-rw-r--r--lib/rbcodec/dsp/pbe.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rbcodec/dsp/pbe.c b/lib/rbcodec/dsp/pbe.c
index 8fb893a661..634849d91c 100644
--- a/lib/rbcodec/dsp/pbe.c
+++ b/lib/rbcodec/dsp/pbe.c
@@ -64,6 +64,9 @@ static void pbe_buffer_free(void)
64 64
65static void dsp_pbe_flush(void) 65static void dsp_pbe_flush(void)
66{ 66{
67 if (handle < 0)
68 return;
69
67 memset(core_get_data(handle), 0, PBE_BUFSIZE); 70 memset(core_get_data(handle), 0, PBE_BUFSIZE);
68 71
69 b0_r[0] = 0; b0_w[0] = 0; 72 b0_r[0] = 0; b0_w[0] = 0;
@@ -142,6 +145,9 @@ static void pbe_process(struct dsp_proc_entry *this,
142 145
143 int32_t *b0[2], *b2[2], *b3[2]; 146 int32_t *b0[2], *b2[2], *b3[2];
144 147
148 if (handle < 0)
149 return;
150
145 b0[0] = core_get_data(handle); 151 b0[0] = core_get_data(handle);
146 b0[1] = b0[0] + B0_SIZE; 152 b0[1] = b0[0] + B0_SIZE;
147 b2[0] = b0[1] + B0_SIZE; 153 b2[0] = b0[1] + B0_SIZE;