[FFmpeg-devel] [PATCH 4/6] avcodec: add common fflcms2 boilerplate

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Tue Jun 28 23:03:02 EEST 2022


Michael Niedermayer:
> On Tue, Jun 28, 2022 at 03:41:09PM +0200, Niklas Haas wrote:
>> From: Niklas Haas <git at haasn.dev>
>>
>> Handling this in general code makes more sense than handling it in
>> individual codec files, because it would be a lot of unnecessary code
>> duplication for the plenty of formats that support exporting ICC
>> profiles (jpg, png, tiff, webp, jxl, ...).
>>
>> encode.c and decode.c will be in charge of initializing this state as
>> needed, so we merely need to make sure to uninit it afterwards from the
>> common destructor path.
>>
>> Signed-off-by: Niklas Haas <git at haasn.dev>
>> ---
>>  configure             | 2 +-
>>  libavcodec/Makefile   | 1 +
>>  libavcodec/avcodec.c  | 4 ++++
>>  libavcodec/decode.c   | 4 ++++
>>  libavcodec/internal.h | 8 ++++++++
>>  5 files changed, 18 insertions(+), 1 deletion(-)
> 
> doesnt build here: (ubuntu x86)
> CC	libavformat/4xm.o
> In file included from ./libavcodec/internal.h:37:0,
>                  from libavformat/4xm.c:32:
> ./libavcodec/fflcms2.h:32:10: fatal error: lcms2.h: No such file or directory
>  #include <lcms2.h>
>           ^~~~~~~~~
> compilation terminated.
> ffbuild/common.mak:81: recipe for target 'libavformat/4xm.o' failed
> make: *** [libavformat/4xm.o] Error 1
> 

He uses

+#ifdef CONFIG_LCMS2
+# include "fflcms2.h"
+#endif

where he should use #if as we unconditionally add the CONFIG_* defines
to config.h and config_components.h.
(This has already been mentioned on IRC; the "if (trc =
AVCOL_TRC_UNSPECIFIED)" in 6/6 has also been mentioned there.)

- Andreas


More information about the ffmpeg-devel mailing list