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

Matthias Hopf mat at mshopf.de
Sat Feb 18 18:58:04 CET 2006


On Feb 17, 06 13:42:37 +0100, Guillaume POIRIER 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.
> >
> > Please ignore the v_jitter_sum variable in the patch - it is a leftover
> > from my current work. The lines numbers won't match exactly as well.
> 
> I don't know anything about mencoder's code, so I can't tell you much
> about your patch.
> 
> However, I'd be interested if you could upload a _short_ sample
> somewhere (you could try ftp://213.144.138.186/MPlayer/incoming/) to
> see if your problem is reproductible on my machine.

This will be difficult, as
a) I'm working with HDTV material and
b) this is more some theoretical problem ATM.

I haven't encountered a stream with an issue WRT this yet, but AFAICS it
is theoretically possible, that skip_flag is non-zero at the end of the
main loop, and its value should be preserved for the next iteration.

I just analyzed the mencoder a/v sync system, and stumbled upon this,
and thought that one of the main authors of the main loop could
immedeately accept or decline this patch. It's completely possible that
I missunderstood something in the code, but my conclusions seem
plausible (to me, that is ;^)

> I'd also suggest trying Corey Hickey's patches to improve MEncoder:
> http://archives.free.net.ph/thread/20060217.023945.cb6b19b8.en.html
> http://archives.free.net.ph/thread/20060217.090827.3fadf13f.en.html

I'm following this discussion closely, and they fix other much more
important long-standing issues.

CU

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