[Mplayer-dev-eng] Experimental patch for optimized "wine" build for mplayer
Arpi
arpi at thot.banki.hu
Fri Jun 29 19:12:28 CEST 2001
Hi,
> Well, turning on optimization for "wine" was easy, but I soon learned why
> optimization was disabled for "wine": mplayer crashes inside wine for
> almost every .avi file you throw at it.
:)
> The reason for these crashes are mismatches between function prototypes
> using the "__stdcall" attribute and function definitions that do not
> have a valid prototype in scope and at the same time omit the "__stdcall"
> attribute.
>
> This produces a *nice* mess no the CPU's stack; the caller of such a function
> with __stdcall prototype thinks the called function removes arguments from
> the stack, but the function does not! And in case the compiler has optimized
> out the frame-pointer register (-fomit-frame-pointer) we absolutely need a
> correct stack-pointer, else access to the function's local variables and
> parameter failes.
Hmm. I've never debugged this problem, but this can explain many things!
> It seems there have been attempts to fix these stack problem by __asm__ code
> (STORE_ALL, REST_ALL macros; explicit "fsave" asm instructions to save FPU
> registers, etc...); the lastest avifile-0.6 CVS even includes some
> setitimer() stuff for xxxBSDs .
No. That STORE/REST stuff is for some codec which changes segment registers
or leave FPU in unusable state (MMX etc). It was disabled, but I had to
enable it for something. (but not remember why, and maybe it works wihtout
it now)
> Appended is an experimental patch for the current mplayer CVS tree. It tries
Thank you. I have only one problem with this patch:
it possibly solves problem in mplayer tree. But I used to merge with
Avifile-CVS after each big change (or adding support for a new codec) in it.
But if we differ a lot from avifile-CVS loader then it will be a really hard
work. You should send this patch to the avifile developers first, and after
it we can merge/update loader in mplayer.
I don't know how it works, and changed only driver.c and DirectShow/DS_*
files in that sub-tree. Other files are from avifile CVS without
any big modification.
> Can you please test this patch against a copy of your the current CVS
> tree. Does it configure / build properly? Can the resulting mplayer
> binary still play all your favourite .avi / .asf files that used to
> work with the unpatched mplayer? Are there perhaps some .avi / .asf
> files that work now, that did not work without the patch?
Ok, I'll test it!
(I have a big set of files using various codecs and file formats for
testing)
A'rpi / Astral & ESP-team
--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu
_______________________________________________
Mplayer-dev-eng mailing list
Mplayer-dev-eng at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-dev-eng
More information about the MPlayer-dev-eng
mailing list