summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Nowak <code@dawg.eu>2018-08-19 10:42:04 +0200
committerSolomon Peachy <pizza@shaftnet.org>2018-09-28 17:47:28 +0200
commite18425197e41cc2ecdc475cbd9d18ce36cb1b6e4 (patch)
tree04248e25917fcac59af6088b585dc79efeabc76d
parenta454b7f9efe1f935f37b1e91c0aba2fd9190aed5 (diff)
downloadrockbox-e18425197e41cc2ecdc475cbd9d18ce36cb1b6e4.tar.gz
rockbox-e18425197e41cc2ecdc475cbd9d18ce36cb1b6e4.zip
fix FS#13060 - Seeking in long opus files leads to crash on Sansa Clip+
- increase decoder thread stack size just enough (2KiB) to avoid stack overflows when seeking in opus files - only do so on devices with at least 8MiB of RAM Change-Id: I7e7182ae866338b4aad6ed7e32391ddd667121bd
-rw-r--r--apps/codec_thread.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/codec_thread.c b/apps/codec_thread.c
index b511809d6d..e45e9aec6b 100644
--- a/apps/codec_thread.c
+++ b/apps/codec_thread.c
@@ -90,7 +90,9 @@ extern struct codec_api ci; /* from codecs.c */
90static unsigned int codec_thread_id; /* For modifying thread priority later */ 90static unsigned int codec_thread_id; /* For modifying thread priority later */
91static struct event_queue codec_queue SHAREDBSS_ATTR; 91static struct event_queue codec_queue SHAREDBSS_ATTR;
92static struct queue_sender_list codec_queue_sender_list SHAREDBSS_ATTR; 92static struct queue_sender_list codec_queue_sender_list SHAREDBSS_ATTR;
93static long codec_stack[(DEFAULT_STACK_SIZE + 0x2000)/sizeof(long)] IBSS_ATTR; 93/* Workaround stack overflow in opus codec on highmem devices (see FS#13060). */
94#define WORKAROUND_FS13060 (MEMORYSIZE >= 8 ? 0x800 : 0)
95static long codec_stack[(DEFAULT_STACK_SIZE + 0x2000 + WORKAROUND_FS13060)/sizeof(long)] IBSS_ATTR;
94static const char codec_thread_name[] = "codec"; 96static const char codec_thread_name[] = "codec";
95 97
96static void unload_codec(void); 98static void unload_codec(void);