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 79F7E40F4C for ; Mon, 3 Jan 2022 02:23:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8F6ED68B1B1; Mon, 3 Jan 2022 04:23:15 +0200 (EET) Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 817DD68B151 for ; Mon, 3 Jan 2022 04:23:09 +0200 (EET) Received: from w3.tutanota.de (unknown [192.168.1.164]) by w4.tutanota.de (Postfix) with ESMTP id 3371B1060159 for ; Mon, 3 Jan 2022 02:23:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1641176588; 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=LD1zehatjehbHaPf0Ti+3ItoB8s64Y+TPP911yL7ja8=; b=wI6seTF2ZygIRF0dFSaF4btayhrtHAZ+X4JHonlmLMOxooS9i8Unkr0e68Xxzz17 lamavstpMQWaN1pG0V6SWq1OqxfVmAW8twVW4sQOsaLQSDAz57CcXSxbsvk0p+f/98s 3Jn0Zq+eUzg9nhQRDxvUOkvQP560KNuDLQ5FNhffPChB28aOSN/d94f9A3ab840/PmO gzGwsC7KUsE/XuV7fL20LLCG6SLfvtbrVonpSXbnX4iD5mBdn4laAeBS6InyuyD6vW2 naZV7BqtSbsd77T7zPeeJD7815Jg5XNY3vejOvNAcrqW+/SB9g1fwjEP+UHfepw72sI BDOakFaEdA== Date: Mon, 3 Jan 2022 03:23:08 +0100 (CET) From: Lynne To: FFmpeg development discussions and patches Message-ID: In-Reply-To: <20220102145142.4083918-5-jianhua.wu@intel.com> References: <20220102145142.4083918-1-jianhua.wu@intel.com> <20220102145142.4083918-5-jianhua.wu@intel.com> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 5/5] avfilter/vf_blend: fix un-checked potential memory allocation failure 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: 2 Jan 2022, 15:51 by jianhua.wu-at-intel.com@ffmpeg.org: > Signed-off-by: Wu Jianhua > --- > libavfilter/vf_blend.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c > index b6f3c4fed3..2d433e439f 100644 > --- a/libavfilter/vf_blend.c > +++ b/libavfilter/vf_blend.c > @@ -279,7 +279,11 @@ static AVFrame *blend_frame(AVFilterContext *ctx, AVFrame *top_buf, > dst_buf = ff_get_video_buffer(outlink, outlink->w, outlink->h); > if (!dst_buf) > return top_buf; > - av_frame_copy_props(dst_buf, top_buf); > + > + if (av_frame_copy_props(dst_buf, top_buf) < 0) { > + av_frame_free(&dst_buf); > + return top_buf; > + } > > for (plane = 0; plane < s->nb_planes; plane++) { > int hsub = plane == 1 || plane == 2 ? s->hsub : 0; > Pushed patches 2 and 3. The blend filter doesn't work for me: https://0x0.st/osRM.jpg This is not what it's meant to look like at all, for blank, default options. Patch 1 is a driver bug. The driver should not advertise the HDR extension as supported if there's no swapchain. The HDR extension explicitly requires a swapchain, and the Vulkan specs say that devices are meant to only advertise supported extensions, which the HDR extension wouldn't be if the swapchain extension has not been loaded. I pushed an alternative version that just removes the HDR extension, but you need to notify your Windows driver developers that it's not doing what it should. _______________________________________________ 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".