mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
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:
parent
79be8760f0
commit
894bd068a4
2 changed files with 7 additions and 4 deletions
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue