[MPlayer-dev-eng] r32056 Causes Loss of A/V Sync with VOB files

Steaphan Greene sgreene at cs.binghamton.edu
Fri Jun 17 01:02:36 CEST 2011


On 06/16/2011 03:24 PM, Steaphan Greene wrote:
> I hope that helps someone realize what's going on.  If not, I will
> continue to try to track it down in the code myself.

I have found the culprit, but I'm not sure what the correct solution
really should be:

Line 2514 of mplayer.c (r33634) has:

	sh_video->pts = pts;

...which adjusts the video time.  When the video is the component that
is lagging behind, this seems to just solidify the error, making it get
worse and worse until it finally resyncs (with a seek or moving to the
next file).  Disabling just this one line fixes my problem.

Whatever the root issue here, it seems that every 12 frames or so, my
video is showing recalculated time-stamps that are a bit off.  If the
above line is used, the times are then forever off every 12 frames,
leading to serious A/V sync problems.  If this line is not used, then
these recalculated-time frames remain close, and sync is maintained.

Perhaps this code was designed only for video that went too fast for the
audio, and not the other way around (and thus, ptsdiff should not be
calculated with fabs)?

If anyone has any ideas as to what I should try/test next to correctly
solve this problem, please let me know.  I am out of my depth to try to
correctly fix this myself, as I don't understand what it was the
original patch was added to fix in the first place.

Thanks!

-- 
Steaphan Greene <sgreene at cs.binghamton.edu>
Lecturer, Computer Science, Binghamton University
GPG public key: http://www.cs.binghamton.edu/~sgreene/gpg.key.txt


More information about the MPlayer-dev-eng mailing list