[MPlayer-dev-eng] VP6

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Jan 10 20:37:55 CET 2004


Hello,

> failed. It segfaults somewhere and i have no clue why :(

I only got signal 8 (that's a arithmetic exception, no segmentation 
faukt). Is that what you meant?

> I uploaded the dll and some samples to http://people.ee.ethz.ch/~adogan/vp6
> I'd appreciate it if someone could have a look at it.

I had a look at it. I think the problem is that the codec it tries to 
divide by some number that is set by the control panel app. This results 
in a division by zero (as under mplayer this of course isn't set).
My "solution" is simply removing those division instructions.

Do either
1)
patch vp6vfw.dll (I didn't have a look at the DirectShow version):
offsets 0x7268-0x726d, 0x7e83-0x7e88, 0x806a-0x806f, set to 0x90

or
2)
apply the attached patch for MPlayer/loader/module.c.

Both were tested to work with mobile_vp6_392kb.vp6 (the other files are 
too big for my internet connection...)


Both methods will only work for this special dll, but finding the 
offsets for method 2 is easy:

For anyone who's interested and knows at least a bit about assembler 
and/or debugging:

shell> gdb mplayer

(gdb) run -nofs mobile_vp6_392kb.vp6
..some output...
Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 16384 (LWP 946)]
0x1000806a in ?? ()
(gdb)

The address given is the one making trouble. Do
(gdb) disassemble 0x1000806a -1
to see how long this instruction is.

0x1000806a:     divl   0x32c(%ebx)
0x10008070:     mov    %eax,0xffffffd8(%ebp)
0x10008073:     mov    %eax,0xabc(%ebx)

So here we must set 0x1000806a to 0x10008070-1 to 0x90 to remove that 
instruction.

Go on like this until all problems are gone.
See if the codec still works ;-)

Greetings,
Reimar Döffinger
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vp6dll.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040110/103aeb53/attachment.txt>


More information about the MPlayer-dev-eng mailing list