From patchwork Wed Sep 27 10:03:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 43975 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2a18:b0:15d:8365:d4b8 with SMTP id e24csp2493824pzh; Wed, 27 Sep 2023 03:07:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFMH7vT6VyitzQQl7MQNEHmbU1YRY2GhLLJpxW7DZ+Bo3zr+tgcrKig0vXoyxqiCf/izObo X-Received: by 2002:a05:651c:103b:b0:2c0:18b8:9656 with SMTP id w27-20020a05651c103b00b002c018b89656mr1664240ljm.24.1695809252010; Wed, 27 Sep 2023 03:07:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695809251; cv=none; d=google.com; s=arc-20160816; b=pyum/7nLhD0bETtRVUs8Om/nKrwfsALi1rIg3aJpkN8YzyU7vbErvJKQ5qrAuDHN3t YKcSLk8OIL5X+A4jmm0WUFCCplQGi0ZZqBEBhkoKnwBYwMNQylhiTqG/3P6lCfm4yMDS 5VOHIN7fc17WkXFlQLVPy+5Gn3uVh6YWOx4qPU2xBElaxwfcdLGb16Ioy3UkZh3LjYDc ixfcRxqU5rWfEiVPksC+MrawJ1m5c2s2uylfLX+a81XlZy+YBfuFaML42yl0Y8H5Kay5 Cx6F+gfFBxBxB8sY+TanIGx4i8/NGID84oNPv1KvKcWjCHBBZ0I+F/hyaj1aYtlHKjit 8snw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=nSvSVyS/QcjzerIBVYfh6ilcR8rPZREnqjvWZOzG0sU=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=X1leX+kEtBYhUoujo9bSsKBfXHiurz+YWSsHkZe46SIPPJDJ5bF+3bu6XVE8v5S3Nk YNRFzHn459BVJ+Muzati8eygxKMBSLXEajc8Fk+mHYxNGVvwDPfJHbks0r4zWV5H4Mn2 R4kF3tgjMAIyFtOW89xUv/ZJumxJoGbysE//ZV+sxZN9C/DCVBadLxS4B7w3wDOuAupf nbXeLT1Qz58JND9qa9PwHahGLnIOeFf/WndWC95/rpMgu9fI4KOwbyUVrIH4hrT2EuXC LSwB01Lz4a73Ct+a5bPnPEWvA2g2daPukuuiZSErvs+8LMUFZy2eSgbvqI/17vKrMvb+ IsUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=OFQRsKg0; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id j4-20020a170906254400b009ad8059e428si13718597ejb.860.2023.09.27.03.07.28; Wed, 27 Sep 2023 03:07:31 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=OFQRsKg0; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A86EA68CAE9; Wed, 27 Sep 2023 13:06:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 291B668CAB8 for ; Wed, 27 Sep 2023 13:06:41 +0300 (EEST) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id DB9B24B97C; Wed, 27 Sep 2023 12:06:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1695809200; bh=tYYhgSpMaB35HuIZ/CW7jUYOwD8PTXPHDtLUWzsOTD8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OFQRsKg0aWS2eeKhxXhG9hPoV1Ko08vTYLNPiE4PcRD12hNtFdguFny+plD7jSj2F X24mwfGsEeotQ7Coa5mJoPINI6xSk0SwDnMzcZIX8Bw/gjf39pYXEosyuYYq3CA2db zooQU/CDds2jSLH6kc9uoNkbc5eypFOKpiBn8xK4= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Wed, 27 Sep 2023 12:03:55 +0200 Message-ID: <20230927100630.50510-5-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927100630.50510-1-ffmpeg@haasn.xyz> References: <20230927100630.50510-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/5] avfilter/vf_iccdetect: use ff_icc_profile_sanitize X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: eUKYwsagApHo From: Niklas Haas --- 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);