summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/codecs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/codecs.c b/apps/codecs.c
index ec566dba06..249cd8f5c1 100644
--- a/apps/codecs.c
+++ b/apps/codecs.c
@@ -177,12 +177,14 @@ void codec_get_full_path(char *path, const char *codec_root_fn)
177void *codec_get_buffer_callback(size_t *size) 177void *codec_get_buffer_callback(size_t *size)
178{ 178{
179 void *buf = &codecbuf[codec_size]; 179 void *buf = &codecbuf[codec_size];
180 *size = CODEC_SIZE - codec_size; 180 ssize_t s = CODEC_SIZE - codec_size;
181 ALIGN_BUFFER(buf, *size, CACHEALIGN_SIZE);
182 181
183 if (*size <= 0) 182 if (s <= 0)
184 return NULL; 183 return NULL;
185 184
185 *size = s;
186 ALIGN_BUFFER(buf, *size, CACHEALIGN_SIZE);
187
186 return buf; 188 return buf;
187} 189}
188 190