aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/decode.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2023-09-27 11:49:57 +0200
committerNiklas Haas <git@haasn.dev>2023-10-03 00:28:50 +0200
commit0d596776c63a33887526b416dbf0353bc3821437 (patch)
tree6d80550912bea318ee3d1f7f16275b87a8c5fe4b /libavcodec/decode.c
parent443471356f2807d4b5657f61c4081cb65ccdd597 (diff)
downloadffmpeg-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.c4
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);