core: Rewrite some of the A/V sync related code
commit321c93ee998266cff4ce5b5eff2aaba4e2311dd0
authorUoti Urpala <uau@glyph.nonexistent.invalid>
Mon, 8 Dec 2008 18:04:08 +0000 (8 20:04 +0200)
committerUoti Urpala <uau@glyph.nonexistent.invalid>
Wed, 14 Jan 2009 00:06:13 +0000 (14 02:06 +0200)
treeaa457dd522f75e384902e54e3d71e4f93071237e
parent5204fda1213f1bb876fd71f16f44767edc8eae46
core: Rewrite some of the A/V sync related code

Notable functionality changes:
* Timing change between any two frames is now accurately limited to
  1/10 of their nominal distance. Previous code did not always use the
  correct duration.
* The status line now keeps showing the same A-V sync value from one
  video frame change to the next. Previously it kept recalculating
  the value using a new audio position but the same video position
  when the status line was updated between video frames. This
  incorrectly showed the video losing sync with audio.
* The status line now displays actual measured A-V difference in
  autosync mode too. The previous code displayed values that
  completely ignored real timing in autosync mode, showing 0 A-V
  difference even when video was significantly behind audio due to
  inadequate decoding speed. The new behavior can make the shown A-V
  values appear more unstable if the audio out has unreliable delay
  measurements (the most likely reason to use autosync), but this is a
  display change rather than a timing quality change.
* Autosync mode now tries to adjust timing by the amount of time
  vo_flip() calls take, so the calls start earlier and finish at the
  time the frame should be shown. Previously non-autosync mode
  adjusted for this but autosync did not.
* The warning about the system being too slow to decode the video in
  realtime is now displayed in autosync mode too.
mp_core.h
mplayer.c