Commit 313e51a5 authored by Ronald S. Bultje's avatar Ronald S. Bultje

gst/speed/gstspeed.c: Fix buffer overflow (#172281).

Original commit message from CVS:
* gst/speed/gstspeed.c: (speed_chain):
Fix buffer overflow (#172281).
parent d63f08d6
2005-04-02 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/speed/gstspeed.c: (speed_chain):
Fix buffer overflow (#172281).
2005-04-01 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/playback/gstplaybin.c: (gst_play_bin_class_init),
......
......@@ -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;
......
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