Message ID | 20240223143115.16521-26-anton@khirnov.net |
---|---|
State | New |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:26a3:b0:19e:cdac:8cce with SMTP id h35csp993044pze; Fri, 23 Feb 2024 06:33:16 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCURoWvkhJ8BsCltQj94Q9S5PLv9SX7BJZ2na9FCG2FZ/xza5yBkww9MLjQp5slLi1jVbrG9L77jhgVJA/EqrT7tnrK7XQU9TSZ5ZA== X-Google-Smtp-Source: AGHT+IE6YbthZIT1f60kXRcysGVTjAFeGVFj/9xBQZH4KNT4LcqYkZz1HCrKhs0ly1SFWN3TxMHU X-Received: by 2002:a17:906:31ce:b0:a3f:1250:5c3e with SMTP id f14-20020a17090631ce00b00a3f12505c3emr14515ejf.0.1708698796051; Fri, 23 Feb 2024 06:33:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708698796; cv=none; d=google.com; s=arc-20160816; b=LoEWmyplrjQpfPrFoFe568hRVThPrTYofFkpwUB4FVgXlpelKHN5ab4ZQm9Gmsuwvs 0VWW2gpMWAk3Z5sKE25an5JUX8Fmfe31hPZhSXVUWgj+IPqc3lJA8tVgC7Rd4plQT72m 6ThHscMoynMrFL1nLQVakRBAiahysvyOEuGawbQJAsKiAuGCvs2P83NpLq0PmptLcG1j eNsGKU8tmFtEs9a65QbmSA+YSxHogqcvHolXRVPAna7Wap6QY5lIFE3Tw7WTTp0o4xhT 9Mo0h0qoC2JHv9rk67MFAjau4ee1oTT+E0E2pzSX+16L4JZyvP64k6GI8MDFZ3wtSssc U9eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=4LWTrKWbBO0c3FWJUUHUs0svAAJs8z0Iv86UP5l9VQg=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=e3Im8FNcspYTXqxzzjnRpoL/eOrngwwMKJAfoG0mlALy8CmH0DcufD0t2WcFuIeOCf I3PADFIvkhnZcuU0+ynnqvBNeFxCEj9qTq/pLjVh9uPN+w22fc+5OJq5ef0e1pSxAG2f t60s//EmrSEsSPLp3DGIkvn9GZEdyQ+C//YEQGyZaIaP7ZIKaKmpkxiDDjDmMT2+qCg5 vB3Zue1M3Xi8zvkH315ivkD1+qhEfE1czoHwNIxcWcB3vLn3CJqFPUFdewT5fVLdjWHM TQXvqapaJdaJkQoL4HIhxcbZB9cc6dW5Z011cjJgRlR1WHUAEoC4MOKXEI2t41k+DSze w/Mw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=dHh9GyvU; 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: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id hz4-20020a1709072ce400b00a400e5b5af2si341891ejc.411.2024.02.23.06.33.15; Fri, 23 Feb 2024 06:33:16 -0800 (PST) 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=@khirnov.net header.s=mail header.b=dHh9GyvU; 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 04DB568C7B8; Fri, 23 Feb 2024 16:31:49 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9DE3168C64C for <ffmpeg-devel@ffmpeg.org>; Fri, 23 Feb 2024 16:31:35 +0200 (EET) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=dHh9GyvU; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id C78524D4C for <ffmpeg-devel@ffmpeg.org>; Fri, 23 Feb 2024 15:31:32 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id nUfQx14TMowl for <ffmpeg-devel@ffmpeg.org>; Fri, 23 Feb 2024 15:31:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1708698687; bh=HyUQ9eqXcXyhpKE3fDbV0tykYw98RvqEzxBihMQ1l2Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dHh9GyvUsY+Ij5ScSHMp7GDP6yGF/rB2oxkeZGBWQl5i+8kYlKKoNb5ih2aXsMFJ/ cTNjvSxK0i0iRMpqiAlDwHZQsXrFyg9VkujdWsatV3jSoKMJJmNAL3nYRbScvGpPbE NcoblKk8AKXkY3vVAlYSt5HEp4KyB4RxEgV38+jYP28YxoVvizr5ZIlj3biJLWM3Jn 4/Fb2RtySUhwizXJ/FkQ+rMBOqhPtSdlkeQFkFEUngOB0AhpPcwAJI1y4E2dgLaaVa x6rIKrSIz+ITOmGvKxGlzLyC4p5PK9QF5kbbn5/+Ozel9dT++NW3d20dc4PxfgCgz7 otgpehus7+mvQ== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id C631F4D52 for <ffmpeg-devel@ffmpeg.org>; Fri, 23 Feb 2024 15:31:27 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 0280C3A21EC for <ffmpeg-devel@ffmpeg.org>; Fri, 23 Feb 2024 15:31:23 +0100 (CET) From: Anton Khirnov <anton@khirnov.net> To: ffmpeg-devel@ffmpeg.org Date: Fri, 23 Feb 2024 14:58:47 +0100 Message-ID: <20240223143115.16521-26-anton@khirnov.net> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240223143115.16521-1-anton@khirnov.net> References: <20240223143115.16521-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 25/38] avcodec/mjpegdec: respect side data preference X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: aelSGq0ypoBF |
Series |
[FFmpeg-devel,01/38] lavu/opt: cosmetics, change option flags to (1 << N) style
|
expand
|
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 81f724d230..43b36d0a8f 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -2840,16 +2840,18 @@ the_end: for (i = 0; i < s->iccnum; i++) total_size += s->iccentries[i].length; - sd = av_frame_new_side_data(frame, AV_FRAME_DATA_ICC_PROFILE, total_size); - if (!sd) { + ret = ff_frame_new_side_data(avctx, frame, AV_FRAME_DATA_ICC_PROFILE, total_size, &sd); + if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "Could not allocate frame side data\n"); - return AVERROR(ENOMEM); + return ret; } - /* Reassemble the parts, which are now in-order. */ - for (i = 0; i < s->iccnum; i++) { - memcpy(sd->data + offset, s->iccentries[i].data, s->iccentries[i].length); - offset += s->iccentries[i].length; + if (sd) { + /* Reassemble the parts, which are now in-order. */ + for (i = 0; i < s->iccnum; i++) { + memcpy(sd->data + offset, s->iccentries[i].data, s->iccentries[i].length); + offset += s->iccentries[i].length; + } } }
From: Niklas Haas <git@haasn.dev> --- libavcodec/mjpegdec.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)