diff options
author | Niklas Haas <git@haasn.dev> | 2023-09-27 11:49:57 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.dev> | 2023-10-03 00:28:50 +0200 |
commit | 0d596776c63a33887526b416dbf0353bc3821437 (patch) | |
tree | 6d80550912bea318ee3d1f7f16275b87a8c5fe4b /libavcodec/decode.c | |
parent | 443471356f2807d4b5657f61c4081cb65ccdd597 (diff) | |
download | ffmpeg-0d596776c63a33887526b416dbf0353bc3821437.tar.gz |
avcodec/decode: use ff_icc_profile_sanitize
Fixes: https://trac.ffmpeg.org/ticket/9673
Diffstat (limited to 'libavcodec/decode.c')
-rw-r--r-- | libavcodec/decode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c index e708d74cbf..c054fee74e 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -536,7 +536,9 @@ static int detect_colorspace(AVCodecContext *avctx, AVFrame *frame) if (!profile) return AVERROR_INVALIDDATA; - ret = ff_icc_profile_read_primaries(&avci->icc, profile, &coeffs); + ret = ff_icc_profile_sanitize(&avci->icc, profile); + if (!ret) + ret = ff_icc_profile_read_primaries(&avci->icc, profile, &coeffs); if (!ret) ret = ff_icc_profile_detect_transfer(&avci->icc, profile, &trc); cmsCloseProfile(profile); |