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 D8C1F42DEB for ; Sat, 9 Jul 2022 00:15:19 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7840568BA43; Sat, 9 Jul 2022 03:15:16 +0300 (EEST) Received: from btbn.de (btbn.de [136.243.74.85]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C1B5A68B99B for ; Sat, 9 Jul 2022 03:15:09 +0300 (EEST) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id 6DBCB342641 for ; Sat, 9 Jul 2022 02:15:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1657325709; bh=Bhx8dOssx+L+N0s8mt+dGvfpGxIpCNf8P6mc9kIxXw0=; h=Date:Subject:To:References:From:In-Reply-To; b=igufp9IeQv6lqt8bdK0PMjd11U6CuIB5NOtCnDlxIkiGZxtihxGPdsyvPfkHrAcDh Gr0ZV6uLXxW43pCb/61BxcPrifGjVqgoMyxT8aqIf5OOOdI7wbAnYW3leq2fflv0z7 D05kn+WA09XWJw6teY8Y0zNC6tJb8Qbnq/BzgSXy6IfEa2RruXvXDpV1fqKaDYVRCy ldiEwa+JjvxZ8xQTkWPPIHPkTasd4utJshrq+nul7WQZTHSn+CPnjUntkyJLjoP4v6 jTAWSSyZDvkJQLw2hN54PFM/SVWDMW+My2b/jk3tlk1hhMZ4lXqbbY6Yh2iWa8vkQ3 GXmrxgKDRVZEQ== Message-ID: Date: Sat, 9 Jul 2022 02:15:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20220708225404.23748-1-timo@rothenpieler.org> From: Timo Rothenpieler In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH v2 0/8] ddagrab source filter, lavfi.c wrapped_avframe and dependent changes 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 09.07.2022 02:01, Soft Works wrote: > I can submit the missing bit of differences as a patch. I thought > it was no longer needed. The requirements have also changed over > MSDK versions. The 8bit file mapping that I've shown recently exists > in fact because an earlier MSDK version was requesting such texture. > > Anyway, when something is causing trouble, then it should be fixed > in hwcontext_qsv. Settings those flags correctly isn't at all a bad idea though, and not fixing any issue I actively experienced. Just an oversight I noticed while reading the code. Fixing the heap overflow is the major issue and can really only be done in the d3d11 hwcontext. Look at the texture_flags array. It only ever gets initialized to the size of the initial pool size. With a non-fixed-size pool, that grows over time, that obviously is an issue, and will trash whatever comes after the hwcontext on the heap whenever more frames are requested than initially allocated. With a initial size of 0, that is... immediately. An entire other issue this does not address at all, but which also does not cause any memory corruption at least: QSV can't properly deal with a non-fixed-size pool. What happens if more fresh frames are allocated after the qsv hwctx has been derived? From the looks of it, it iterates and maps all the textures only once at init. _______________________________________________ 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".