[FFmpeg-devel] llrint()..

Marc Mason mpeg.blue
Mon Dec 22 09:57:55 CET 2008

Andreas Oman wrote:

> For a system that does not have llrint() libavutil provides one.
> However, the necessary header file is not included from the c-files
> where llrint() is used.

I believe this statement is incorrect.

> This patch fixes that.
> I'm not sure it's the best way, but it should be fixed somehow.


--- libavcodec/mpegaudiodec.c	(revision 16251)
+++ libavcodec/mpegaudiodec.c	(working copy)
@@ -27,6 +27,7 @@
  #include "avcodec.h"
  #include "bitstream.h"
  #include "dsputil.h"
+#include "libavutil/common.h"

mpegaudiodec.c includes avcodec.h
avcodec.h includes libavutil/avutil.h
avutil.h includes common.h (in libavutil)
common.h includes internal.h
internal.h conditionally defines llrint

static av_always_inline av_const long long llrint(double x)
     return rint(x);
#endif /* HAVE_LLRINT */

Same thing for opt.c


More information about the ffmpeg-devel mailing list