[MPlayer-dev-eng] Potential source of A-V sync issues
Matthias Hopf
mat at mshopf.de
Fri Feb 24 16:17:22 CET 2006
On Feb 18, 06 22:35:50 +0200, Oded Shimon wrote:
> On Wed, Feb 01, 2006 at 12:51:34AM +0100, Matthias Hopf wrote:
> > 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.
Actually, you are right. I overlooked that skip_flag is still zero at mencoder:1282:
if (v_timer_corr >= mux_frametime && (skip_limit<0 || skip_flag < skip_limit)) {
v_timer_corr-=mux_frametime;
++skip_flag; // skip
}
It still looks like a bug too me - it should read skip_flag < 1 )
But there should have been an assert() in this case so noone accidentially
breaks it.
Anyway, I will need a persistent skip_flag for my jitter patch anyway, so I
will include there for testing.
Thanks
Matthias
--
Matthias Hopf <mhopf at suse.de> __ __ __
Maxfeldstr. 5 / 90409 Nuernberg (_ | | (_ |__ mat at mshopf.de
Phone +49-911-74053-715 __) |_| __) |__ labs www.mshopf.de
More information about the MPlayer-dev-eng
mailing list