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 CCCAD4990C for ; Fri, 23 Feb 2024 14:33:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AC85F68C978; Fri, 23 Feb 2024 16:31:50 +0200 (EET) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BA33768C657 for ; 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=f0a/vBXl; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 60DEA4D5E for ; Fri, 23 Feb 2024 15:31:34 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id mDGYICFeLKHm 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=28aC7klwA7/hcW1w4FKsSAyLEYWp46IUDxTxmGkRBS4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=f0a/vBXlxK4IODkbTKAAc+tpcWZXMWT5gGVw0/LOe1rvi0Zx8zbMGf/NGg1FWuRca gTtcPBKMgLEf9G43+ChBbWfoP5yoiBL6R0hhZMSPADAoBdpBZ0ka6kUS5JtJqn+I1z jxzFAk2wGuMcFisPEL1cWqxEvaqSYpyyzMrVdUFhqkvOV+YMrOfAvsR6aST5ZQ5Ms8 GChy3/KFyd4gEKbn6qWNbvRUqt/Gtg8gJ/6OdgxESk5k/fHjyAmnTSJ6H1oOqcGMB+ vCAMhXdYblmHbDO8RMPZRu3w2CM60toKvJwjO4jmnUvWgrM8U2fUrucxUYCOmlXwy+ erLt5FizvalXQ== 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 3CEE54D64 for ; Fri, 23 Feb 2024 15:31:28 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 837913A274D 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:58 +0100 Message-ID: <20240223143115.16521-37-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 36/38] avcodec/hevcdec: switch to ff_frame_new_side_data_from_buf 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 For consistency, even though this cannot be overriden at the packet level. --- libavcodec/hevcdec.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 0cb2577b39..e5213aa252 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -2824,10 +2824,8 @@ static int set_side_data(HEVCContext *s) } if (s->rpu_buf) { - AVFrameSideData *rpu = av_frame_new_side_data_from_buf(out, AV_FRAME_DATA_DOVI_RPU_BUFFER, s->rpu_buf); - if (!rpu) - return AVERROR(ENOMEM); - + if (!ff_frame_new_side_data_from_buf(s->avctx, out, AV_FRAME_DATA_DOVI_RPU_BUFFER, s->rpu_buf)) + av_buffer_unref(&s->rpu_buf); s->rpu_buf = NULL; } @@ -2839,10 +2837,8 @@ static int set_side_data(HEVCContext *s) if (!info_ref) return AVERROR(ENOMEM); - if (!av_frame_new_side_data_from_buf(out, AV_FRAME_DATA_DYNAMIC_HDR_VIVID, info_ref)) { + if (!ff_frame_new_side_data_from_buf(s->avctx, out, AV_FRAME_DATA_DYNAMIC_HDR_VIVID, info_ref)) av_buffer_unref(&info_ref); - return AVERROR(ENOMEM); - } } return 0; -- 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".