[vlc-devel] Core audio S/PDIF output with latency calculation

Rémi Denis-Courmont remi at remlab.net
Mon Mar 11 11:08:01 CET 2013


On Sun, 10 Mar 2013 18:05:36 +0100, David Fuhrmann
<david.fuhrmann at gmail.com> wrote:
> With this more generic approach, the result would make sense in any
case,
> also in the case that the length calculation might be changed elsewhere,
> later on.
> Opinions about that?

Unfortunately, the length of a packet is not necessarily the sum of the
length of the packets that it was synthetized from. Rounding errors occur
since 48000 is not a divisor of CLOCK_FREQ.

See date_t usage in most codecs and some demuxers for a proper way to
compute the length.

-- 
Rémi Denis-Courmont
Sent from my collocated server



More information about the vlc-devel mailing list