Hard-coded DLL path in libvlc.pp
Original Reporter info from Mantis: wp @wpam
-
Reporter name:
Original Reporter info from Mantis: wp @wpam
- Reporter name:
Description:
The fpc installation contains in folder packages/libvlc the units required to run the multi-format video player VLC in an fpc or Lazarus program. For this purpose, two DLLs are needed. In Windows, these DLLs are found in the VLC installation folder, "c:\Program files\VideoLAN\VLC". This folder is hard-coded in the unit libvlc.pp as "DefaultLibPath".
This fails, however, if the 32-bit VLC is running on a 64-bit Windows because now the installation folder is "c:\Program files (x86)\VideoLAN\VLC".
The attached patch reads the VLC installation folder from the Windows registry instead of relying on a hard-coded path (the patch is relative to packages\libvlc).
Steps to reproduce:
Run the demo program testvlc in packages\libvlc\example. It crashes in case of a 32-bit VLC on 64-bit Windows.
Additional information:
See also the discussion on http://forum.lazarus.freepascal.org/index.php/topic,34420.0.html
Mantis conversion info:
- Mantis ID: 30762
- OS: Win 64bit
- OS Build: Win 10
- Platform: 32 bit
- Version: 3.0.0
- Fixed in version: 3.1.1
- Fixed in revision: 34866 (#ab566789)
- Monitored by: » @michaliskambi (Michalis Kamburelis)
- Target version: 3.2.0