[MPlayer-dev-eng] [PATCH] INFINITY undefined in libmpcodecs/ve_lavc.c

Steven M. Schultz sms at 2BSD.COM
Thu Dec 5 06:43:44 CET 2002


Hi!

	On some systems (I have checked FreeBSD and BSD/OS) <math.h> does
	not define INFINITY.    The value HUGE_VAL is however defined.
	Checking a linux system I see that INFINITY is defined as
	HUGE_VALF which is very similar.

	This patch will handle systems which have the Posix but not c99 
	"infinite" value.

	Cheers,
	Steven Schultz
	sms at 2bsd.com

--- libmpcodecs/ve_lavc.c.dist	Wed Dec  4 21:20:38 2002
+++ libmpcodecs/ve_lavc.c	Wed Dec  4 21:38:21 2002
@@ -4,6 +4,10 @@
 #include <math.h>
 #include <time.h>
 
+#if !defined(INFINITY) && defined(HUGE_VAL)
+#define INFINITY HUGE_VAL
+#endif
+
 #include "../config.h"
 
 #ifdef USE_LIBAVCODEC



More information about the MPlayer-dev-eng mailing list