summaryrefslogtreecommitdiffstats
path: root/gst/speed
diff options
context:
space:
mode:
Diffstat (limited to 'gst/speed')
-rw-r--r--gst/speed/gstspeed.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/speed/gstspeed.c b/gst/speed/gstspeed.c
index 88972b9d..8a447fe3 100644
--- a/gst/speed/gstspeed.c
+++ b/gst/speed/gstspeed.c
@@ -489,7 +489,10 @@ speed_chain (GstPad * pad, GstData * data)
in_buf = GST_BUFFER (data);
+ /* buffersize has to be aligned by samplesize */
out_size = ceil ((gfloat) GST_BUFFER_SIZE (in_buf) / filter->speed);
+ out_size = (filter->sample_size * (out_size + filter->sample_size - 1)) /
+ filter->sample_size;
out_buf = gst_pad_alloc_buffer (filter->srcpad, -1, out_size);
in_samples = GST_BUFFER_SIZE (in_buf) / filter->sample_size;