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 D5C0E40670 for ; Thu, 27 Jan 2022 09:07:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 50C8868B21F; Thu, 27 Jan 2022 11:07:28 +0200 (EET) Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7BFE768B040 for ; Thu, 27 Jan 2022 11:07:22 +0200 (EET) Received: from w3.tutanota.de (unknown [192.168.1.164]) by w4.tutanota.de (Postfix) with ESMTP id 2B54B10601E6 for ; Thu, 27 Jan 2022 09:07:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1643274442; s=s1; d=lynne.ee; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding: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=rXKToGq3POW9Gfr+dZFSmBRubZQg6lK/rWNzUY3hjTc=; b=wDX4jkf0ElBULbcr5OHvruFJI/6s3txw3IkOqvyZgPO/2BdCbUQT8ZVSLAHSyMxN i7euGrhSPPjuPrfz8U28HwBV6WeegUph/IIadPVGJOaWxD5GBGczZnqqELYhgzg9zkk rnCmwkjJAr32eMNKpBISEeWzloehQ6mRge7YokGuSwQqgr8dC3URkAVP9+fqJNNxlBz 0mWaK6G8efN8yqXbkLAX0KRc2z/pdC6qaVE+nDyx0kifnVqp3wJtnLAK9zvM4ep8t2/ WlfXZjKuRV+nZDgRPamQ8t9NbtFov6vxnngOcZSVaYfDNVVVZkdxMVb3WtL6MjdyEiw oyygmQRzuw== Date: Thu, 27 Jan 2022 10:07:22 +0100 (CET) From: Lynne To: FFmpeg development discussions and patches Message-ID: In-Reply-To: References: MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH v2] hwcontext_vulkan: workaround MoltenVK's bug which leads to segmentation fault 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: 27 Jan 2022, 09:38 by quinkblack@foxmail.com: > MoltenVK doesn't reset instance when CreateInstance() failed, > then DestroyInstance() leads to segmentation fault. MoltenVK's bug > has been fixed by [1], which doesn't available on homebrew yet. > Regardless MoltenVK's bug, we shouldn't call DestroyInstance() > in the case of CreateInstance() failed, so reset instance making > sense. > > [1] https://github.com/KhronosGroup/MoltenVK/commit/86a1fbdb8 > --- > libavutil/hwcontext_vulkan.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c > index 2e219511c9..d3bd37a6a7 100644 > --- a/libavutil/hwcontext_vulkan.c > +++ b/libavutil/hwcontext_vulkan.c > @@ -719,6 +719,8 @@ static int create_instance(AVHWDeviceContext *ctx, AVDictionary *opts) > if (ret != VK_SUCCESS) { > av_log(ctx, AV_LOG_ERROR, "Instance creation failure: %s\n", > vk_ret2str(ret)); > + /* Workaround MoltenVK's bug which doesn't reset instance. */ > + hwctx->inst = VK_NULL_HANDLE; > err = AVERROR_EXTERNAL; > goto fail; > } > Not a fan of working around this implementation bug. Couldn't homebrew just update? _______________________________________________ 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".