[MPlayer-dev-eng] Potential source of A-V sync issues

Oded Shimon ods15 at ods15.dyndns.org
Sat Feb 18 21:35:50 CET 2006


On Wed, Feb 01, 2006 at 12:51:34AM +0100, Matthias Hopf wrote:
> Hi all,
> 
> I'm currently rewriting part of the mencoder main loop as I get a whole
> bunch of skipped + duplicated frames (typically leveling out) when
> encoding some TCed material (transport streams) to avis. I'm already
> testing an early patch, that works very well for me, but I really have
> to rewrite it (it was only a hack so far).
> 
> While analyzing the code, I noticed, that skip_flag is initialized with
> 0 at the begining of the while (!at_eof) - but as only one frame can be
> skipped at a time, skip_flag might still be positive (but not
> negative!). The following patch moves the definition of skip_flag
> outside the main loop, but I haven't really tested it.

Look at the code, everything that deals with skipping makes sure skip_flag 
never raises above 1. You can pretty much add an assert that skip_flag is 
zero by the end of the mess.

- ods15




More information about the MPlayer-dev-eng mailing list