[MPlayer-users] build failure libmpcodecs/mp_image.c:

Masaru Nomiya nomiya at lake.dti.ne.jp
Wed Oct 11 16:03:58 EEST 2023


Hello,

In the Message; 

  Subject    : [MPlayer-users] build failure libmpcodecs/mp_image.c:
  Message-ID : <0a53d54c-ae9e-42fe-84a1-ab865b441c0d at gmail.com>
  Date & Time: Wed, 11 Oct 2023 07:43:48 -0500

[RJM] == "Rinaldi J. Montessi" <rinaldij at gmail.com> has written:

RJM>  Today's svn:

RJM>  libmpcodecs/mp_image.c: In function 'mp_image_alloc_planes':
RJM>  libmpcodecs/mp_image.c:39:39: error: 'INT_MAX' undeclared (first use in this
RJM>  function)
RJM>     39 |   if ((unsigned int)mpi->height + 2 > INT_MAX ||
RJM>        |                                       ^~~~~~~
RJM>  libmpcodecs/mp_image.c:34:1: note: 'INT_MAX' is defined in header '<limits.h>';
RJM>  did you forget to '#include <limits.h>'?
RJM>     33 | #include "mp_msg.h"
RJM>    +++ |+#include <limits.h>
RJM>     34 |
RJM>  libmpcodecs/mp_image.c:39:39: note: each undeclared identifier is reported only
RJM>  once for each function it appears in
RJM>     39 |   if ((unsigned int)mpi->height + 2 > INT_MAX ||
RJM>        |                                       ^~~~~~~
RJM>  make: *** [Makefile:730: libmpcodecs/mp_image.o] Error 1

As the error message indicates, the following will solve the problem;

--- mp_image.c.orig	2022-09-02 16:34:10.845482633 +0900
+++ mp_image.c	2023-10-09 06:00:48.392663375 +0900
@@ -31,6 +31,7 @@
 #include "libvo/fastmemcpy.h"
 #include "libavutil/mem.h"
 #include "mp_msg.h"
+#include <limits.h>
 
 void mp_image_alloc_planes(mp_image_t *mpi) {
   /* This condition is stricter than needed, but I want to be sure that every

Regards & Good Night.

---
┏━━┓彡 野宮  賢                             mail-to: nomiya @ lake.dti.ne.jp
┃\/彡
┗━━┛  "Companies have come to view generative AI as a kind of monster that
	  must be fed at all costs―even if it isn’t always clear what exactly
	  that data is needed for or what those future AI systems might end up
	  doing."
	  
        -- Generative AI Is Making Companies Even More Thirsty for Your Data --


More information about the MPlayer-users mailing list