# HG changeset patch # User reimar # Date 1258712577 0 # Node ID 5eef60a98c6f6289e7e725268909ceb71843266b # Parent ecf6cbab0b8d4f3320d95f574d38cc3857d68cd9 Use FFMAX instead of a custom max macro. diff -r ecf6cbab0b8d -r 5eef60a98c6f subreader.c --- a/subreader.c Wed Nov 18 18:24:05 2009 +0000 +++ b/subreader.c Fri Nov 20 10:22:57 2009 +0000 @@ -19,6 +19,7 @@ #include "mp_msg.h" #include "subreader.h" #include "stream/stream.h" +#include "libavutil/common.h" #ifdef CONFIG_ENCA #include @@ -1147,9 +1148,6 @@ #endif #ifdef CONFIG_FRIBIDI -#ifndef max -#define max(a,b) (((a)>(b))?(a):(b)) -#endif subtitle* sub_fribidi (subtitle *sub, int sub_utf8) { FriBidiChar logical[LINE_LEN+1], visual[LINE_LEN+1]; // Hopefully these two won't smash the stack @@ -1184,7 +1182,7 @@ if(log2vis) { len = fribidi_remove_bidi_marks (visual, len, NULL, NULL, NULL); - if((op = malloc((max(2*orig_len,2*len) + 1))) == NULL) { + if((op = malloc((FFMAX(2*orig_len,2*len) + 1))) == NULL) { mp_msg(MSGT_SUBREADER,MSGL_WARN,"SUB: error allocating mem.\n"); l++; break;