Commit 894bd068 authored by Stefan Kost's avatar Stefan Kost
Browse files

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
parent 79be8760
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:
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment