xbmc/xbmc — pull request #3158 by anssih (2013-08-28 17:34:53+00:00)
Title: SoftAE: Fix A/V sync issues caused by wrong buffer time calculation

CSoftAE::GetDelay(), CSoftAE::GetCacheTime(), and
CSoftAE::GetCacheTotal() assume in their calculations that m_buffer
contains frames that have sink/encoder frame size. However, m_buffer
actually contains frames in the format received from CSoftAEStream.

This causes varying levels of A/V de-sync depending on other conditions.
On my Linux system I encounter this always when using using HDMI audio
and having the display refresh rate set at 24Hz (approx 100-200ms desync
that stays approximately constant).

Fix those functions to use the correct frame size.