mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-07 05:35:02 -05:00
[Bug Fix] dsp_proc_enable init race / crash
haas surround is causing a seg fault it appears process is null see https://www.rockbox.org/tracker/task/13382 for details when the low_latency_callback is enabled it happens less frequently lets default to an empty process that way there are no NULL pointers to call Change-Id: Ib72ba1a58cbb20cef04b5ea50964adadeee74a75
This commit is contained in:
parent
ac9066dd44
commit
863538c50a
2 changed files with 9 additions and 2 deletions
|
|
@ -214,6 +214,13 @@ dsp_proc_enable_delink(struct dsp_config *dsp, uint32_t mask)
|
|||
}
|
||||
}
|
||||
|
||||
static void dsp_empty_process(struct dsp_proc_entry *this, struct dsp_buffer **buf_p)
|
||||
{
|
||||
(void)this;
|
||||
(void)buf_p;
|
||||
logf("%s", __func__);
|
||||
}
|
||||
|
||||
void dsp_proc_enable(struct dsp_config *dsp, enum dsp_proc_ids id,
|
||||
bool enable)
|
||||
{
|
||||
|
|
@ -236,7 +243,7 @@ void dsp_proc_enable(struct dsp_config *dsp, enum dsp_proc_ids id,
|
|||
{
|
||||
/* New entry - set defaults */
|
||||
s->proc_entry.data = 0;
|
||||
s->proc_entry.process = NULL;
|
||||
s->proc_entry.process = dsp_empty_process;
|
||||
}
|
||||
|
||||
enabled = proc_db_entry(s)->configure(&s->proc_entry, dsp,
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ typedef void (*dsp_proc_fn_type)(struct dsp_proc_entry *this,
|
|||
*
|
||||
* default settings:
|
||||
* .data = 0
|
||||
* .process = NULL
|
||||
* .process = dsp_empty_process (dsp_core.c)
|
||||
*
|
||||
* DSP_PROC_INIT handler just has to change what it needs to change. It may
|
||||
* also be modified at any time to implement the stage's demands.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue