audioresample: Fix buffer size transformations
authorJan Schmidt <thaytan@noraisin.net>
Fri, 1 May 2009 15:47:53 +0000 (16:47 +0100)
committerJan Schmidt <thaytan@noraisin.net>
Fri, 1 May 2009 15:47:53 +0000 (16:47 +0100)
commit02a7b31f0e7a9e6630efe925696a9229423314aa
tree72b5eec9a439ed059aa010e7e3c4cdac4a91c459
parentd14c80b22e5d128093fc642cf48406710f9123db
audioresample: Fix buffer size transformations

When calculating the input/output buffer sizes in the transform_size function,
take the number of channels into account, so we don't end up calculating
a buffer size that only contains a partial number of audio frames.

Also, when going from output size to input size, round down rather than
up, so as to calculate the minimum number of samples that *might* yield
a buffer of the intended destination size.

Fixes: #580470 and #580952
gst/audioresample/gstaudioresample.c