[MPlayer-dev-eng] syncing issues (frame_time undefined)

Dean Pierce piercede at pdx.edu
Fri Jun 23 07:44:20 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

MPlayer 1.0pre8-3.4.6 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(TM) XP 2200+ (Family: 6, Model: 8, Stepping: 0)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE


Some of my videos would lose sync, and whenever that would happen, there
was an error message that looked something like this:

Invalid frame duration value (1302.634/1302.634 => -0.000). Defaulting
to 0.025 sec.

I grepped for the error message, and found it somewhere around line 597
in /MPlayer-1.0pre8/libmpdemux/video.c

Looking in that area I noticed that it seemed to be handling what
happens when frame times have negative values in certain types of video
streams.  It seems that the point of that code is to define what
frame_time should be based on the value of d, but when d is negative,
the value of frame_time remains untouched.  The value that ends up
getting used as the frame_time seems to be the frame_time of the
previous frame.

It seems to be that if the frame_time is invalid, the frame_time should
be set to zero.  On the line before the error message, I just put
frame_time=0; , recompiled, installed, and all my previously broken
videos played perfectly.

I did some basic testing, and it seems to work fine with the
modification, and even managed to resync properly when I forced a desync
with high cpu load etc.


This is really the first time I have looked into mplayer code, so I have
no idea if this modification is acceptable, as I have zero understanding
of the overall architecture.  I just wanted to watch those videos, and
had some spare time.  I thought I should inform the list, and I hope
that someone will find this tidbit of information useful :-)

   - DEAN
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIVAwUBRJt/tOeyqwX756grAQJCTw//U+CCe5bQHeEV/icF78Qs1cUpxfDhh1q6
J1o5xC2EZUw4DrBKP78EergM4lN3nnmG7ip8ze/RVK90mFA5O99UdyqZo89saiE3
z7VcnS0uZYpjrNxml/PjRw5A30rhaZo6EkAKV4GtBJzsVKRLPrmkHExy5ufu5Y2G
sxL87LOAqfx5y5qjJs7wdUzl/er2S7YMEBevqfcYz0VMWf8ZmlO30LfruiB2cv0C
1hOSC6ZX/kuATnIzCOPwLv0yG3jX+zHRuztDKegSY/z0rhBsXS3o682hID7vNXj/
NRcYijhPFxFdCJ6vDoXfLVZxXYcmeYgFtaNwZWrbB3di64ul7rISxZ6XgVOulX6l
YNWAlTmeaOFJw+89A8Dj13rhz6WveK6LiyyFaddFyUWrh7GwRvLc+syJH0Mw/r6x
igtqa4otpoFTOkLcXg8NEMJu2+pXV66u/Xhyex41I/Ta3geMXP10XIlv3HXXkkxM
1ou1ov6Sv6SNwp7wQgvVuwegRxgyaqsQwEkiVSQX/DiXLv1Uei/VE8t4jCCmDyCX
E8fL4XTe1YMjEAwy+GZjmyJMZ6eH20WVu+Y60+nNrohqShREzshGifYzRbDNYRwy
HJDfvaU0YYBmvQsKpVeCgCrjKza1v8O7k51ughVoyEawIuQaPzmW1euBmZNmP+MR
viwfXklhuhE=
=IqBb
-----END PGP SIGNATURE-----



More information about the MPlayer-dev-eng mailing list