[MPlayer-dev-eng] [PATCH] Fix for mpeg2 A/V sync bug.
Reimar.Doeffinger at gmx.de
Sun Jun 26 20:49:58 CEST 2011
On Fri, Jun 24, 2011 at 09:30:57AM -0400, Steaphan Greene wrote:
> The attached patch fixes the bug with vob files (and, presumably other
> mpeg2 content) caused by the A/V sync code added with r32055/32056. I
> believe this solution should cause no other harm.
> Basically, it now just removes the last_pts data when one of these pts
> changes occurs in the mpeg2 stream. That way, the A/V resync code in
> question ignores this frame, and no longer breaks anything.
> It seems likely that this same sort change may be needed for other cases
> where the pts is non-uniform, to prevent this resync from causing this
> same problem. However, I leave that to someone who understands all
> these cases better than I. For my part, I am fairly confident that this
> fixes the bug I found, without damaging anything else.
But this is not code for non-uniform time-stamps really but it is
And my suspicion is that your change only makes it so that non-B-frames
which MPlayer can detect break the other correction code you pointed out before.
If so you could just avoid the obfuscation and put the whole other code
under "if codec != MPEG-2" for exactly the same effect.
More information about the MPlayer-dev-eng