summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/demac/libdemac/parser.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/codecs/demac/libdemac/parser.c b/apps/codecs/demac/libdemac/parser.c
index 7e0fd8f250..ebde36deed 100644
--- a/apps/codecs/demac/libdemac/parser.c
+++ b/apps/codecs/demac/libdemac/parser.c
@@ -35,6 +35,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
35 35
36#include "parser.h" 36#include "parser.h"
37 37
38#ifdef APE_MAX
39#undef APE_MAX
40#endif
41#define APE_MAX(a,b) ((a)>(b)?(a):(b))
42
38 43
39static inline int16_t get_int16(unsigned char* buf) 44static inline int16_t get_int16(unsigned char* buf)
40{ 45{
@@ -148,8 +153,8 @@ int ape_parseheaderbuf(unsigned char* buf, struct ape_ctx_t* ape_ctx)
148 if (ape_ctx->totalframes > 1) 153 if (ape_ctx->totalframes > 1)
149 ape_ctx->totalsamples += ape_ctx->blocksperframe * (ape_ctx->totalframes-1); 154 ape_ctx->totalsamples += ape_ctx->blocksperframe * (ape_ctx->totalframes-1);
150 155
151 ape_ctx->numseekpoints = MAX(ape_ctx->maxseekpoints, 156 ape_ctx->numseekpoints = APE_MAX(ape_ctx->maxseekpoints,
152 ape_ctx->seektablelength / sizeof(int32_t)); 157 ape_ctx->seektablelength / sizeof(int32_t));
153 158
154 return 0; 159 return 0;
155} 160}