From patchwork Tue Jun 13 04:20:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lynne X-Patchwork-Id: 42055 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c526:b0:117:ac03:c9de with SMTP id gm38csp3425210pzb; Mon, 12 Jun 2023 21:20:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7JXBK8aaWBNVc+8cQVg2nrVKLVVgI+YPdOEp87UfCCgq5rt1/3Rh6wsVY2S0z5SaVEMJnk X-Received: by 2002:aa7:c988:0:b0:514:9239:49f2 with SMTP id c8-20020aa7c988000000b00514923949f2mr6957574edt.37.1686630029474; Mon, 12 Jun 2023 21:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686630029; cv=none; d=google.com; s=arc-20160816; b=vnrNDZ/7x9N9wQxMoKSDF+/bKyyYWmMJBKzTTPwsIOCppXYgGQBrDATD3e1Uyt4QpF 0ZBwnqqSP1UUk2dsjgJWXj/QHWf1b/oollZ8XQZu2ndle1klWbgAmIn1csV+aeX1IfEp TuD7KnJFtKLN46Cy1QudCkyY7hdxMcwwQW5pRdNlwv0vO1vwWDaxr01p62zl3qc2sh8x VGsYEPdyokiifqyNKVMtLjnHeWXpCyB8sCtDsOLtiAQ7FpuQQqZbuww1Q9Vr3lV8txPc ZWq+TvwwD6FEqOzNQtbaFCPzSVeEmiT74XxwyuGWsk7ikFv3L4OGP5hKGYdZxdwTilFi neSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:to:from:date :dkim-signature:delivered-to; bh=A7Nz2mT737N541n00ooB3sXaxEpvHrw9sGXv9JhR1kQ=; b=bUCcpZ5Q9uMhW5iz9/7LGhwWeSuyqKRNbQoshziP0IaUBLCo8fePEzt+oImwwM8JGR 1Lw1YuNL7kqsdwgBjJy223OpekycD8YYMe6i8UkPT6+0q/YjsebTUPFd4POYmuQ9YHTB 0sNWcaEHdfCUF9gKr94a6a1b49530PRiNwO+Y8uNzdPQbuXeGX33eQwrSuID5y9/AB5j n/oMnFrSMjFZ+0m12MpBf1pO0t5AYjrTPQBmqqgM1DZNopE9IX8my12OyhGvbn81TBDN tpSAr5iV/y/Ht1I+E8BSX7KFs5Up4a6WQoUp03kQS8dCRtTecBToduOWG31cVlpVUaEV G+HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@lynne.ee header.s=s1 header.b=pjRzChCa; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=lynne.ee Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t9-20020aa7d4c9000000b00514ab8a6c74si7110297edr.648.2023.06.12.21.20.29; Mon, 12 Jun 2023 21:20:29 -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=@lynne.ee header.s=s1 header.b=pjRzChCa; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=lynne.ee Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D0ABA68C390; Tue, 13 Jun 2023 07:20:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 76C9868C33F for ; Tue, 13 Jun 2023 07:20:20 +0300 (EEST) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w4.tutanota.de (Postfix) with ESMTP id 8574E1060154 for ; Tue, 13 Jun 2023 04:20:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1686630020; s=s1; d=lynne.ee; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=nIxvLWS4m1ZkdCOs8e5tsM2cTsDyLLNgiyrodKg7SY4=; b=pjRzChCaunmFweDThHYeX+koiIfvK8wjobvEU/VTuvqWIXRUT9Bbch/+zhxB5sfp 6E7u8ofI1jXUMN0mJDflSPBOcw0QLNo4NxRVhgLbi02VhNTik1BxoijyQ5t/xzSBHS5 hapRBT4x50mjVghBDdpwZ8wUHCEwEywjbAkK1z/pPZG3fHav+ocU9P+jtGMAJhOFnkS jyoWKvgariTel9pc436Qzf4gRM9wNWJ9fgMJ+4q3fjTkxFI+DKvBq442G7U9xrXq7QX +HN8iDA3KG4o12n3S1e9zJq5/EUHVlC9QBP+ru9+iqgcZuq/uEyMJ9c74j8kW4iREjw sEgOk+y3Wg== Date: Tue, 13 Jun 2023 06:20:20 +0200 (CEST) From: Lynne To: FFmpeg development discussions and patches Message-ID: In-Reply-To: References: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/5] hwcontext_vulkan: call ff_vk_uninit() on device uninit 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: HbQm61VVta29 This fixes three memory leaks from ff_vk_load_props(). Does not depend on any other patches. Patch attached. From 75945869e8341058edd1fca72b9ccf46d0086ddc Mon Sep 17 00:00:00 2001 From: Lynne Date: Tue, 13 Jun 2023 04:35:29 +0200 Subject: [PATCH 3/5] hwcontext_vulkan: call ff_vk_uninit() on device uninit This fixes three memory leaks from ff_vk_load_props(). --- libavutil/hwcontext_vulkan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 1132a61390..c86229ba65 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -1176,6 +1176,8 @@ static void vulkan_device_free(AVHWDeviceContext *ctx) RELEASE_PROPS(hwctx->enabled_inst_extensions, hwctx->nb_enabled_inst_extensions); RELEASE_PROPS(hwctx->enabled_dev_extensions, hwctx->nb_enabled_dev_extensions); + + ff_vk_uninit(&p->vkctx); } static int vulkan_device_create_internal(AVHWDeviceContext *ctx, -- 2.40.1