gst/adder/gstadder.c: fix adder for float elements

Original commit message from CVS:
* gst/adder/gstadder.c: (gst_adder_collected):
fix adder for float elements
This commit is contained in:
Stefan Kost 2005-09-28 18:59:19 +00:00
parent 79be8760f0
commit 894bd068a4
2 changed files with 7 additions and 4 deletions

View file

@ -1,3 +1,8 @@
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:

View file

@ -375,10 +375,8 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data)
{
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;