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 BC3A7426B9 for ; Wed, 25 May 2022 20:51:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4E3E968B583; Wed, 25 May 2022 23:51:54 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3D59868B4F1 for ; Wed, 25 May 2022 23:51:48 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 24PKpls5008932-24PKpls6008932 for ; Wed, 25 May 2022 23:51:47 +0300 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id 2DBFFA142D for ; Wed, 25 May 2022 23:51:46 +0300 (EEST) Date: Wed, 25 May 2022 23:51:45 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: <09de2d36-147f-a02d-987c-6fc34cdf110a@tytanium.xyz> Message-ID: <69c2ee3d-eec6-89f5-fa18-253b9314c9e@martin.st> References: <09de2d36-147f-a02d-987c-6fc34cdf110a@tytanium.xyz> MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM Subject: Re: [FFmpeg-devel] [PATCH v6] avcodec/mfenc: Dynamically load MFPlat.DLL 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 Wed, 25 May 2022, Trystan Mata wrote: > Changes since the v5: > - Library handle and function pointer are back in MFContext. > - MFTEnumEx has been move to it too. > - dlopen and dlclose are preferred. > > This will avoid multiple look up on one context. And each context will > have his own library handle. Thanks, this looks mostly good to me! In testing of it, I noted that you still need to link against -lmfuuid when building with MSVC (but in mingw, those UUIDs are defined inline in headers I think). Additionally, I realized I do prefer to keep using plain LoadLibraryA and FreeLibrary instead of using the wrapper, as this file is all quite Windows specific code; using the direct Windows APIs makes it clearer what's going on. Finally, I removed the extra "" in the GetProcAddress call - I don't remember if you ever responded to why that was there. With that, this builds fine with MSVC for desktop and for UWP, and with mingw for desktop. As the patch seemed fine otherwise, I went ahead and pushed it. Thanks! // Martin _______________________________________________ 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".