[FFmpeg-cvslog] avfilter/vf_iccdetect: use ff_icc_profile_sanitize

Niklas Haas git at videolan.org
Tue Oct 3 01:30:14 EEST 2023


ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Wed Sep 27 11:49:07 2023 +0200| [443471356f2807d4b5657f61c4081cb65ccdd597] | committer: Niklas Haas

avfilter/vf_iccdetect: use ff_icc_profile_sanitize

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=443471356f2807d4b5657f61c4081cb65ccdd597
---

 libavfilter/vf_iccdetect.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_iccdetect.c b/libavfilter/vf_iccdetect.c
index 5288b0320d..16eacbbb56 100644
--- a/libavfilter/vf_iccdetect.c
+++ b/libavfilter/vf_iccdetect.c
@@ -93,7 +93,9 @@ static int iccdetect_filter_frame(AVFilterLink *inlink, AVFrame *frame)
     if (!profile)
         return AVERROR_INVALIDDATA;
 
-    ret = ff_icc_profile_read_primaries(&s->icc, profile, &coeffs);
+    ret = ff_icc_profile_sanitize(&s->icc, profile);
+    if (!ret)
+        ret = ff_icc_profile_read_primaries(&s->icc, profile, &coeffs);
     if (!ret)
         ret = ff_icc_profile_detect_transfer(&s->icc, profile, &s->profile_trc);
     cmsCloseProfile(profile);



More information about the ffmpeg-cvslog mailing list