[Ffmpeg-devel] more stuff for win32

Ramiro Polla ramiro86
Sat Jul 8 19:38:13 CEST 2006


Hello,

I have done some changes in the makefiles for better support for win32.

The first removes ldconfig from the main Makefile if CONFIG_WIN32 is set. Well, it doesn't remove, it just doesn't add it. I know the ldconfig line can fail and the make will still go on (because of the - sign), but this is just a suggestion.

The second changes common.mak and fixes the problems with SLIBNAME_WITH_MAJOR for win32. When CONFIG_WIN32 is set, making SLIBNAME doesn't make SLIBNAME_WITH_MAJOR first to call ln later, it just builds SLIBNAME directly. This fixes the problem with the dlls with version number not being found. Additionally the patch installs the .lib files in the "$(prefix)/lib" folder so that I don't have to copy them to the Visual Studio's lib folder everytime. I just point the linker to this folder and never copy anything to Visual Studio's lib folder.

I still have the problem with ffmpeg.exe and dlls. The error is "The application failed to initialize properly (0xc0000005)". Weird thing is that output_example.exe works well with the dlls, and my programs too. It's just ffmpeg.exe that does this. Did anyone find out exactly what does this, and got it working? I think it might be something wrong with the way the dlls are linked with GCC.
Or can anyone point me in a better direction to investigate? I tried loading it with Dependency Walker, but get the same thing, with not much more information. What I get is:
First chance exception 0xC0000005 (Access Violation) occurred in "c:\windows\syswow64\NTDLL32.DLL" at address 0x7D627029 by thread 1.
First chance exception 0xC0000005 (Access Violation) occurred in "c:\windows\syswow64\NTDLL32.DLL" at address 0x7D64A8C6 by thread 1.
Second chance exception 0xC0000005 (Access Violation) occurred in "c:\windows\syswow64\NTDLL32.DLL" at address 0x7D64A8C6 by thread 1.

I also find it weird that, looking through Dependency Walker, AVCODEC.DLL and AVFORMAT.dll are imported several times. The first time, many functions are imported (which is what is expected). And the subsequent times (10 for avformat and 8 for avcodec), only one global variable is imported, such as first_avcodec (8 times), first_iformat (twice), first_oformat (twice), ffm_nopts (twice), first_image_format (twice), first_protocol (once), and loop_input (once)...

Another thing: how is the __attribute__((visibility("default"))) thing going? I'm pretty sure it would help a lot for windows dlls. That way the dll could only provide the correct API, exporting less symbols, and not making such a mess.

Bye,
Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: common.mak.patch
Type: application/octet-stream
Size: 921 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060708/83e3544d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.ldconfig.patch
Type: application/octet-stream
Size: 352 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060708/83e3544d/attachment-0001.obj>



More information about the ffmpeg-devel mailing list