avfilter/vf_iccdetect: use ff_icc_profile_sanitize

pull/390/head
Niklas Haas 1 year ago
parent beac4a999c
commit 443471356f
  1. 4
      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);

Loading…
Cancel
Save