[MPlayer-dev-eng] [PATCH] remove -ffast-math from CFLAGS and LDFLAGS in configure script

Mike Lieman mikelieman at gmail.com
Sun Aug 18 01:34:26 EEST 2024


The ticket "Video files suddenly take 100s before playback starts" (
https://trac.mplayerhq.hu/ticket/2425 ) describes long startup times with
some files between 10 and 100 seconds.

It began after a change to ffmpeg which uses negative infinity, and the
fast-math library had been optimizing it in a way that spent an inordinate
amount of time in the subsequent loops.

Many people consider the fast-math library dangerous, and we see an example
of why that is so right here.

But simply doing floating point math correctly, the issue is resolved.
This patch removes the fast-math library.

Index: configure
===================================================================
--- configure   (revision 38637)
+++ configure   (working copy)
@@ -2969,10 +2969,10 @@
   elif test "$cc_vendor" != "gnu" ; then
     CFLAGS="-O2 $_march $_mcpu $_pipe"
   else
-    CFLAGS="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
+    CFLAGS="-O4 $_march $_mcpu $_pipe -fomit-frame-pointer"
     WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith
-Wredundant-decls -Werror=format-security"
     WARN_CFLAGS="-Werror-implicit-function-declaration"
-    extra_ldflags="$extra_ldflags -ffast-math"
+    extra_ldflags="$extra_ldflags"
   fi

   if test "$_profile" != "" || test "$_debug" != ""; then


More information about the MPlayer-dev-eng mailing list