avcodec: add common fflcms2 boilerplate

Multimedia / FFmpeg - Niklas Haas [haasn.dev] - 30 July 2022 09:42 UTC

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.

c688ddc067 avcodec: add common fflcms2 boilerplate
configure | 2 +-
libavcodec/Makefile | 1 +
libavcodec/avcodec.c | 4 ++++
libavcodec/decode.c | 4 ++++
libavcodec/internal.h | 8 ++++++++
5 files changed, 18 insertions(+), 1 deletion(-)

  • Share