From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 1A23C48CF2 for ; Fri, 23 Feb 2024 14:35:03 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 52DCA68CAE8; Fri, 23 Feb 2024 16:32:02 +0200 (EET) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2D7AE68C6D3 for ; Fri, 23 Feb 2024 16:31:36 +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=hZSp1uQe; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 2095C4D59 for ; Fri, 23 Feb 2024 15:31:35 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id cxhxm2v0EwYr for ; Fri, 23 Feb 2024 15:31:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1708698688; bh=ctF8Vwbp+i9XsNbdA61/+VEtz26ZeDKwpbgM0mEeIM0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hZSp1uQe/lEmDj0L9snakkaNIz7xaHMLZ1z9KxqaT/tdnjkFMhB/FiPEyxoW6wqFh +wbHg6mgEl3/l63Aet2Wskb0CMulA/B48gU1d+6lngWO71PxUZvP4PtNnpsD82Q80z 0Vw/RHWFNavoxw2oKg6CaO5dKrdN/Am3PgxUByplTOCiCn74RHKeRblPYvvSqXQgrM v6xTIuFim8PwnRAsRMY434d1pahG7wSr8M7FyIsQBW4P1FKr5/WL3c6IyWI6W1+Xku RvdHdXxo+KMQqHfggT4vw4U1wRbO1izSnA/twY1yBwHOzhJc0eD6IU6bSHEHEG3HLt hGg9/W7GrRB5A== 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 38A3B4D61 for ; 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 315B13A25E6 for ; Fri, 23 Feb 2024 15:31:23 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 23 Feb 2024 14:58:51 +0100 Message-ID: <20240223143115.16521-30-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 29/38] avcodec/webp: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Niklas Haas --- libavcodec/webp.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libavcodec/webp.c b/libavcodec/webp.c index 54b3fde6dc..9308ea2b69 100644 --- a/libavcodec/webp.c +++ b/libavcodec/webp.c @@ -1500,11 +1500,16 @@ exif_end: "VP8X header\n"); s->has_iccp = 1; - sd = av_frame_new_side_data(p, AV_FRAME_DATA_ICC_PROFILE, chunk_size); - if (!sd) - return AVERROR(ENOMEM); - bytestream2_get_buffer(&gb, sd->data, chunk_size); + ret = ff_frame_new_side_data(avctx, p, AV_FRAME_DATA_ICC_PROFILE, chunk_size, &sd); + if (ret < 0) + return ret; + + if (sd) { + bytestream2_get_buffer(&gb, sd->data, chunk_size); + } else { + bytestream2_skip(&gb, chunk_size); + } break; } case MKTAG('A', 'N', 'I', 'M'): -- 2.42.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".