diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-23 23:27:49 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 03:31:11 +0000 |
commit | 09f40e266b8e796db0137c5ef25ce1d3da2b4e31 (patch) | |
tree | 0ff00396ff16e042075f171e592a2bd0edb638da | |
parent | 0c4ae417d596dc6385bf4a5e07567a360f4a4ccc (diff) | |
download | rockbox-09f40e2.tar.gz rockbox-09f40e2.zip |
talk: Force-shutdown the voice system before loading a new voice
Otherwise we might actually be talking when we try to switch, or
otherwise trash the state of the running talk thread, leading to
memory corruption or an outright crash
(This fixes a panic observed on the xDuoo X3)
Change-Id: I78e4232085c5c160c9ee4f18167dad8dad2b9287
-rw-r--r-- | apps/talk.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/talk.c b/apps/talk.c index 3c532d964c..72b9a2eb30 100644 --- a/apps/talk.c +++ b/apps/talk.c @@ -919,6 +919,9 @@ void talk_init(void) #endif /* CONFIG_CODEC == SWCODEC */ mutex_init(&read_buffer_mutex); } + + talk_force_shutup(); /* In case we have something speaking! */ + talk_initialized = true; strlcpy((char *)last_lang, (char *)global_settings.lang_file, MAX_FILENAME); |