diff options
Diffstat (limited to 'apps/plugins/lua/tlsf_helper.c')
-rw-r--r-- | apps/plugins/lua/tlsf_helper.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/plugins/lua/tlsf_helper.c b/apps/plugins/lua/tlsf_helper.c index edf32eecf9..097d39c8e4 100644 --- a/apps/plugins/lua/tlsf_helper.c +++ b/apps/plugins/lua/tlsf_helper.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include <tlsf.h> | 22 | #include <tlsf.h> |
23 | #include "lua.h" | ||
23 | 24 | ||
24 | void *get_new_area(size_t *size) | 25 | void *get_new_area(size_t *size) |
25 | { | 26 | { |
@@ -36,7 +37,8 @@ void *get_new_area(size_t *size) | |||
36 | return pluginbuf_ptr; | 37 | return pluginbuf_ptr; |
37 | } | 38 | } |
38 | 39 | ||
39 | if (audiobuf_ptr == NULL) | 40 | /* only grab the next area if lua already tried + failed to garbage collect*/ |
41 | if (audiobuf_ptr == NULL && (get_lua_OOM())->count > 0) | ||
40 | { | 42 | { |
41 | /* grab audiobuffer */ | 43 | /* grab audiobuffer */ |
42 | audiobuf_ptr = rb->plugin_get_audio_buffer(size); | 44 | audiobuf_ptr = rb->plugin_get_audio_buffer(size); |