Skip to content
Snippets Groups Projects
Commit 65a200c4 authored by Aaron Viets's avatar Aaron Viets
Browse files

lal_resample: fixed off-by-one error causing occasional segfaults.

parent 4bbf37de
No related branches found
No related tags found
No related merge requests found
...@@ -1218,7 +1218,7 @@ static GstFlowReturn transform(GstBaseTransform *trans, GstBuffer *inbuf, GstBuf ...@@ -1218,7 +1218,7 @@ static GstFlowReturn transform(GstBaseTransform *trans, GstBuffer *inbuf, GstBuf
element->index_end_samples = g_malloc(2 * sizeof(gint32)); element->index_end_samples = g_malloc(2 * sizeof(gint32));
/* To save memory, we use symmetry and only record half of the sinc table */ /* To save memory, we use symmetry and only record half of the sinc table */
element->sinc_table = g_malloc((element->max_end_samples / 2) * sizeof(double)); element->sinc_table = g_malloc((1 + element->max_end_samples / 2) * sizeof(double));
*(element->sinc_table) = 1.0; *(element->sinc_table) = 1.0;
gint32 i; gint32 i;
double sin_arg; double sin_arg;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment