Original commit message from CVS:
* gst/adder/gstadder.c: (gst_adder_collected):
fix adder for float elements
+2005-09-28 Stefan Kost <ensonic@users.sf.net>
+
+ * gst/adder/gstadder.c: (gst_adder_collected):
+ fix adder for float elements
+
2005-09-28 Wim Taymans <wim@fluendo.com>
* gst-libs/gst/audio/gstbaseaudiosink.c:
{
guint64 duration;
- if (adder->format == GST_ADDER_FORMAT_FLOAT)
- duration = size / adder->width / adder->channels;
- else
- duration = size * 8 / adder->width / adder->channels;
+ /* width is in bits and we need bytes */
+ duration = size * (adder->width / 8) / adder->channels;
GST_BUFFER_TIMESTAMP (outbuf) = adder->timestamp;
GST_BUFFER_OFFSET (outbuf) = adder->offset;