[FFmpeg-cvslog] avcodec/decode: use ff_icc_profile_sanitize
Niklas Haas
git at videolan.org
Tue Oct 3 01:30:16 EEST 2023
ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Wed Sep 27 11:49:57 2023 +0200| [0d596776c63a33887526b416dbf0353bc3821437] | committer: Niklas Haas
avcodec/decode: use ff_icc_profile_sanitize
Fixes: https://trac.ffmpeg.org/ticket/9673
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0d596776c63a33887526b416dbf0353bc3821437
---
libavcodec/decode.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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);
More information about the ffmpeg-cvslog
mailing list