changeset 23961:4e22889a6e35

Ugly hack to make xanlib.dll work. See also http://samples.mplayerhq.hu/game-formats/wc4-xan/
author reimar
date Wed, 01 Aug 2007 03:30:38 +0000
parents 0525bd0aed18
children 33428cfa2af0
files etc/codecs.conf loader/pe_image.c
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/etc/codecs.conf	Wed Aug 01 01:15:26 2007 +0000
+++ b/etc/codecs.conf	Wed Aug 01 03:30:38 2007 +0000
@@ -2024,6 +2024,14 @@
   dll txd
   out BGR32
 
+videocodec xan
+  info "XAN Video"
+  status working
+  fourcc Xxan
+  driver vfw
+  dll "xanlib.dll"
+  out BGR24,BGR15,BGR8 query,flip
+
 videocodec ffwc3
   info "FFmpeg XAN wc3"
   status buggy
--- a/loader/pe_image.c	Wed Aug 01 01:15:26 2007 +0000
+++ b/loader/pe_image.c	Wed Aug 01 03:30:38 2007 +0000
@@ -546,7 +546,8 @@
      *         to work (until we support shared sections properly).
      */
 
-    if ( nt->OptionalHeader.ImageBase & 0x80000000 )
+    if ( nt->OptionalHeader.ImageBase & 0x80000000 &&
+        !strstr(filename, "xanlib.dll"))
     {
         HMODULE sharedMod = (HMODULE)nt->OptionalHeader.ImageBase; 
         IMAGE_NT_HEADERS *sharedNt = (PIMAGE_NT_HEADERS)