summaryrefslogtreecommitdiffstats
path: root/subreader.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-11-20 10:22:57 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-11-20 10:22:57 +0000
commit6712791ad648ab7a6595969421a5d2847a947a29 (patch)
tree3f1a8c5410c6789fc3b7fe7015ce29a029ed25ec /subreader.c
parentc038d74c9bf226d8b48939a0e3a6f542f3928aea (diff)
downloadmpv-6712791ad648ab7a6595969421a5d2847a947a29.tar.bz2
mpv-6712791ad648ab7a6595969421a5d2847a947a29.tar.xz
Use FFMAX instead of a custom max macro.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29935 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subreader.c')
-rw-r--r--subreader.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/subreader.c b/subreader.c
index d4b1db7cef..2fb7fd5f36 100644
--- a/subreader.c
+++ b/subreader.c
@@ -19,6 +19,7 @@
#include "mp_msg.h"
#include "subreader.h"
#include "stream/stream.h"
+#include "libavutil/common.h"
#ifdef CONFIG_ENCA
#include <enca.h>
@@ -1147,9 +1148,6 @@ subtitle* subcp_recode (subtitle *sub)
#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 @@ subtitle* sub_fribidi (subtitle *sub, int sub_utf8)
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;