Handles leak when loading/unloading FFMPEG library in Delphi

164 views Asked by At

I currently have a problem loading/unloading the avfilter-7.dll from ffmpeg 4.22 (x86) using Delphi 2007 (also with Delphi XE3..same problem)

Each loading / unloading process of the library causes a handles leak in Windows x64 Pro for which I currently have no explanation or solution. I have already tried to upgrade to a newer version of the DLL but the leak is even worse, strangely, a very old version (avfilter-2.dll) is not affected by this

    dllLHandle := LoadLibrary(PAnsiChar('c:\Windows\SysWow64\AVFilter-7.dll'));
    if dllLHandle<>0 then begin
       FreeLibrary(dllLHandle);
       dllLHandle:= 0;
    end;

The code above causes an additional leak with each call

Is there something wrong, have I forgotten something?

0

There are 0 answers