From: Niklas Haas <[email protected]>
---
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 5288b0320d2..16eacbbb560 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);
--
2.42.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".