summaryrefslogtreecommitdiffstats
path: root/loader/pe_image.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove win32/qt/xanim/real binary codecs loadingwm42012-08-161-949/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the win32 loader - the win32 emulation layer, as well as the code for using DirectShow/DMO/VFW codecs. Remove loading of xanim, QuickTime, and RealMedia codecs. The win32 emulation layer is based on a very old version of wine. Apparently, wine code was copied and hacked until it was somehow able to load a limited collection of binary codecs. It poked around in the code segment of some known binary codecs to disable unsupported win32 API calls to make them work. Example from module.c: for (i=0;i<5;i++) RVA(0x19e842)[i]=0x90; // make_new_region ? for (i=0;i<28;i++) RVA(0x19e86d)[i]=0x90; // call__call_CreateCompatibleDC ? for (i=0;i<5;i++) RVA(0x19e898)[i]=0x90; // jmp_to_call_loadbitmap ? for (i=0;i<9;i++) RVA(0x19e8ac)[i]=0x90; // call__calls_OLE_shit ? for (i=0;i<106;i++) RVA(0x261b10)[i]=0x90; // disable threads Just to show how utterly insane this code is. You wouldn't want even your worst enemy to have to maintain this. In fact, it seems nobody made major changes to this code ever since it was committed. Most formats can be decoded by libavcodecs these days, and the loader couldn't be used on 64 bit platforms anyway. The same is (probably) true for the other binary codecs. General note about how support for win32 codecs could be added back: It's not possible to replace the win32 loader code by using wine as library, because modern wine can not be linked with native Linux programs for certain reasons. It would be possible to to move DirectShow video decoding into a separate process linked with wine, like the CoreAVC-for-Linux patches do. There is also the mplayer-ww fork, which uses the dshownative library to use DirectShow codecs on Windows.
* cleanup: Silence compilation warnings on MinGW-w64wm42012-03-011-9/+5
| | | | | | | | | | | | | | | | | | | Some of the code, especially the dshow and windows codec loader parts, are extremely hacky and likely full of bugs. The goal is merely getting rid of warnings that could obscure more important warnings and actual bugs, instead of fixing actual problems. This reduces the number of warnings from over 500 to almost the same as when compiling on Linux. Note that many problems stem from using the ancient wine-derived windows headers. There are some differences to the "proper" windows header. Changing the code to compile with the proper headers would be too much trouble, and it still has to work on Unix. Some of the changes might actually break compilation on legacy MinGW, but we don't support that anymore. Always use MinGW-w64, even when compiling to 32 bit. Fixes some warnings in the win32 loader code on Linux too.
* cleanup: remove NULL checks before free() all over the codecboesch2010-11-141-4/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove #warning preprocessor directivesdiego2010-11-021-2/+2
| | | | | | | | The #warning preprocessor directive is non-standard and not available with all compilers. Furthermore, the warnings it causes are noisy and have not led to getting any of the underlying issues fixed in the space of a decade. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32480 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove trailing whitespace from most filesUoti Urpala2009-07-071-89/+89
|
* Avoid u_ BSD type names.diego2008-12-271-13/+13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28197 b3059339-0415-0410-9bf9-f77b7e298cf2
* #include osdep/mman.h if sys/mman.h is not available.diego2008-03-031-0/+2
| | | | | | | patch by KO Myung-Hun, komh chollian net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26143 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get rid of redundant dbg_printf redefinition. Fixes some warnings:diego2008-01-281-14/+14
| | | | | | | wine/debugtools.h:57: warning: useless type name in empty declaration git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25898 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove $Id$ tags, they make diffs between different versionsreimar2008-01-271-1/+0
| | | | | | | harder to read than necessary. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25877 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unused function fixup_address, fixes the warning:diego2008-01-231-12/+0
| | | | | | | pe_image.c:957: warning: 'fixup_address' defined but not used git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25832 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix a ton of illegal identifiers. Identifiers starting with __ or _ and adiego2008-01-201-1/+1
| | | | | | | | capital letter are reserved for the system, those starting with _ are reserved at the file level. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25822 b3059339-0415-0410-9bf9-f77b7e298cf2
* warning fixes:diego2007-09-101-3/+0
| | | | | | | | | | pe_image.c:70: warning: redundant redeclaration of 'LookupExternal' win32.h:41: warning: previous declaration of 'LookupExternal' was here pe_image.c:71: warning: redundant redeclaration of 'LookupExternalByName' win32.h:42: warning: previous declaration of 'LookupExternalByName' was here git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24418 b3059339-0415-0410-9bf9-f77b7e298cf2
* warning fixes:diego2007-09-101-3/+1
| | | | | | | | | | | | pe_image.c: In function 'fixup_imports': pe_image.c:290: warning: unused variable 'wmImp' pe_image.c: In function 'PE_LoadImage': pe_image.c:445: warning: unused variable 'bhfi' pe_image.c: In function 'PE_CreateModule': pe_image.c:706: warning: unused variable 'result' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24401 b3059339-0415-0410-9bf9-f77b7e298cf2
* Ugly hack to make xanlib.dll work.reimar2007-08-011-1/+2
| | | | | | | See also http://samples.mplayerhq.hu/game-formats/wc4-xan/ git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23981 b3059339-0415-0410-9bf9-f77b7e298cf2
* ISO8859-1 --> UTF-8diego2007-07-091-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23754 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename config.h --> debug.h and include config.h explicitly.diego2006-11-261-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21277 b3059339-0415-0410-9bf9-f77b7e298cf2
* CVS --> Subversion in copyright noticesdiego2006-06-221-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18786 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove extra return.rathann2006-05-131-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18487 b3059339-0415-0410-9bf9-f77b7e298cf2
* DragonFly BSD supportdiego2005-05-251-1/+1
| | | | | | | patch by Joerg Sonnenberger <joerg - at - britannica - dot - bec - dot - de> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15567 b3059339-0415-0410-9bf9-f77b7e298cf2
* Mark modified imported files as such to comply with GPL ยง2a.diego2005-04-151-0/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15167 b3059339-0415-0410-9bf9-f77b7e298cf2
* force compilers not to optimize/inline extend_stack_for_dll_allocareimar2004-09-181-3/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13376 b3059339-0415-0410-9bf9-f77b7e298cf2
* avifile sync - 95% cosmetics 5% bugarpi2002-09-131-14/+14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7387 b3059339-0415-0410-9bf9-f77b7e298cf2
* partially synced with avifile... (TODO: migrate to new registry.c and driver.c)arpi2001-11-031-8/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2652 b3059339-0415-0410-9bf9-f77b7e298cf2
* sync with avifilearpi2001-10-041-8/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2070 b3059339-0415-0410-9bf9-f77b7e298cf2
* Pre-allocate some stack space to work around a problem with DLL alloca() codejkeil2001-07-291-10/+12
| | | | | | | on a linux kernel. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1412 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add prototypes to wine/loader stuff, so that we can catch __stdcall functionjkeil2001-07-121-9/+23
| | | | | | | | | | | attribute mismatch between caller/caller. wine/loader is less sensitive to optimization now. (now that avifile-0.6 has the same patch installed, we're a bit closer to their CVS tree) Speed up win32 "QueryPerformanceFrequency" emulation on solaris. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1308 b3059339-0415-0410-9bf9-f77b7e298cf2
* DLL loader updated from avifile-0.60beta4arpi_esp2001-03-181-7/+18
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@129 b3059339-0415-0410-9bf9-f77b7e298cf2
* Initial revisionarpi_esp2001-02-241-0/+936
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2 b3059339-0415-0410-9bf9-f77b7e298cf2