diff options
author | William Wilgus <wilgus.william@gmail.com> | 2021-03-04 21:57:21 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2021-03-04 21:57:21 -0500 |
commit | 10b67071314e0f46bce81a3162ef971963d146af (patch) | |
tree | ca9737661ef138735ca6d26625f22196546a5188 | |
parent | b2732222e99faa361be445d98b39274ab0b268d9 (diff) | |
download | rockbox-10b67071314e0f46bce81a3162ef971963d146af.tar.gz rockbox-10b67071314e0f46bce81a3162ef971963d146af.zip |
Talk Fix outright disable after first clip
Oops Sorry bout that ;P
Change-Id: I2618e2565a218dd5640351dfef3b7cc2a64617d4
-rw-r--r-- | apps/talk.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/talk.c b/apps/talk.c index f9d7100800..8a428d1ed8 100644 --- a/apps/talk.c +++ b/apps/talk.c @@ -624,6 +624,9 @@ static bool load_voicefile_data(int fd) /* the first alloc is the clip metadata table */ metadata_alloc_size = max_clips * sizeof(struct clip_cache_metadata); metadata_table_handle = buflib_alloc(&clip_ctx, metadata_alloc_size); + if (metadata_table_handle <= 0) + talk_status = TALK_STATUS_ERR_OOM; + return false; memset(buflib_get_data(&clip_ctx, metadata_table_handle), 0, metadata_alloc_size); load_initial_clips(fd); @@ -891,7 +894,7 @@ int talk_id(int32_t id, bool enqueue) int32_t unit; int decimals; struct queue_entry clip; - bool isloaded = false; + bool isloaded = true; if (!has_voicefile) return 0; /* no voicefile loaded, not an error -> pretent success */ |