flacdec: Correct sample number rounding resulting in timestamp jitter
authorMonty Montgomery <cmontgom@redhat.com>
Thu, 21 Jul 2011 21:23:28 +0000 (17:23 -0400)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 23 Aug 2011 08:09:41 +0000 (10:09 +0200)
commit799c8e3d04456ce0b22c03de66d20d0a1a599643
tree34b6b9bb4ca471020427776085d6bc7b49875ba7
parent88557c4792d0a5f79a1de144268154dd50743c3d
flacdec: Correct sample number rounding resulting in timestamp jitter

flacdec converts the src timestamp to a sample number, uses that internally, then reconverts the sample number to a timestamp for the output buffer.  Unfortunately, sample numbers can't be represented in an integer number of nanoseconds, and the conversion process was truncating rather than rounding, resulting in sample numbers and output timestamps that were often off by a full sample.

This corrects the time->sample convesion
ext/flac/gstflacdec.c