avcodec: add common fflcms2 boilerplate

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@haasn.dev>
This commit is contained in:
Niklas Haas
2022-06-28 15:13:04 +02:00
parent e1a0f2df3d
commit c688ddc067
5 changed files with 18 additions and 1 deletions

View File

@@ -49,6 +49,10 @@
#include "internal.h"
#include "thread.h"
#if CONFIG_LCMS2
# include "fflcms2.h"
#endif
static int apply_param_change(AVCodecContext *avctx, const AVPacket *avpkt)
{
int ret;