~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to loader/module.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 *
9
9
 */
10
10
 
11
 
// define for quicktime calls debugging and/or MacOS-level emulation:
12
 
#ifndef __APPLE__
13
 
#define EMU_QTX_API
14
 
#endif /* __APPLE__ */
15
 
 
16
11
// define for quicktime debugging (verbose logging):
17
12
//#define DEBUG_QTX_API
18
13
 
19
14
#include "config.h"
20
15
#include "debug.h"
21
16
 
 
17
// define for quicktime calls debugging and/or MacOS-level emulation:
 
18
#if !defined(__APPLE__) && defined(CONFIG_QTX_CODECS)
 
19
#define EMU_QTX_API
 
20
#endif /* __APPLE__ */
 
21
 
22
22
#include <assert.h>
23
23
#include <errno.h>
24
24
#include <fcntl.h>
435
435
            printf("Win32 LoadLibrary failed to load: %s\n", checked);
436
436
 
437
437
#define RVA(x) ((char *)wm->module+(unsigned int)(x))
 
438
        if (strstr(libname, "CFDecode2.ax") && wm)
 
439
        {
 
440
            if (PE_FindExportedFunction(wm, "DllGetClassObject", TRUE) == RVA(0xd00e0))
 
441
            {
 
442
                // Patch some movdqa to movdqu
 
443
                // It is currently unclear why this is necessary, it seems
 
444
                // to be some output frame, but our frame seems correctly
 
445
                // aligned
 
446
                int offsets[] = {0x7318c, 0x731ba, 0x731e0, 0x731fe, 0};
 
447
                int i;
 
448
                for (i = 0; offsets[i]; i++)
 
449
                {
 
450
                    int ofs = offsets[i];
 
451
                    if (RVA(ofs)[0] == 0x66 && RVA(ofs)[1] == 0x0f &&
 
452
                        RVA(ofs)[2] == 0x7f)
 
453
                        RVA(ofs)[0] = 0xf3;
 
454
                }
 
455
            }
 
456
        }
438
457
        if (strstr(libname,"vp31vfw.dll") && wm)
439
458
        {
440
459
            int i;