Closed basisbit closed 4 years ago
FFmpeg 2.0 moved some functions like av_frame_free from libavcodec to libavutil. Our FFmpeg units still tell FPC that they are in libavcodec. On Windows the imports in a binary have to tell exactly which symbol is imported from which DLL. The linker on Windows does not search the DLLs. On Linux/macOS the linker looks into all libraries but doesn't record in the binary which shared library actually provided the symbol.
(The linker for C applications on Windows also doesn't look at the DLLs. For linking C applications on Windows there are usually static libraries with the same name as the DLLs that contain the pieces that have to be put into the imports section of the binary. So the linker doesn't even know about shared libraries.)
thanks for the hint! Fixed with b584279
Actual behaviour
The game crashes at startup showing a message stating it can't find the procedure "av_frame_free" and the the game closes.
Expected behaviour
The game should start and work just fine, playing audio and video files and so on.
Steps to reproduce
To prepare for the next release, I tried to update USDX to any somewhat recent ffmpeg library bundles. They are available here: https://ffmpeg.zeranoe.com/builds/win32/shared/
avcodec-*.dll
,avdevice-*.dll
,avfilter-*.dll
,avformat-*.dll
,avutil-*.dll
,postproc-*.dll
,swresample-*.dll
andswscale-*.dll
Details
av_frame_free
is in destructor TFFmpegDecodeStream.Destroy(); which the compiler does not stop at when adding a breakpoint there.