[pulseaudio-commits] 2 commits - src/modules

David Henningsson diwic at kemper.freedesktop.org
Mon Dec 8 01:26:38 PST 2014


 src/modules/module-equalizer-sink.c |   18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 162adb9873f8ec0faf6dad4a11d266961f116a9e
Author: Jason Newton <nevion at gmail.com>
Date:   Fri Dec 5 08:38:31 2014 +0000

    module-equalizer-sink: remove erroneous fixme
    
    pa_memblockq_drop is guaranteed to drop the chunk we just extracted from the
    memblockq which internally unrefs the chunk.

diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c
index 7aea5d3..70c30f5 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -674,8 +674,6 @@ END:
     pa_assert(chunk->memblock);
     pa_memblockq_drop(u->output_q, chunk->length);
 
-    /** FIXME: Uh? you need to unref the chunk here! */
-
     //pa_log_debug("gave %ld", chunk->length/fs);
     //pa_log_debug("end pop");
     return 0;

commit 7201c9be982917bc93a37eca7c47d87bf625ecae
Author: Jason Newton <nevion at gmail.com>
Date:   Fri Dec 5 08:38:30 2014 +0000

    module-equalizer-sink: use fftwf_free in all the right places
    
    Several mallocs were made using fftwf_malloc and were erroneously freed by
    pa_xfree. This patch corrects these calls of pa_xfree to fftwf_free.

diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c
index ce5f8c1..7aea5d3 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -232,7 +232,7 @@ static void alloc_input_buffers(struct userdata *u, size_t min_buffer_length) {
         if (u->input[c]) {
             if (!u->first_iteration)
                 memcpy(tmp, u->input[c], u->overlap_size * sizeof(float));
-            free(u->input[c]);
+            fftwf_free(u->input[c]);
         }
         u->input[c] = tmp;
     }
@@ -1344,22 +1344,22 @@ void pa__done(pa_module*m) {
 
     fftwf_destroy_plan(u->inverse_plan);
     fftwf_destroy_plan(u->forward_plan);
-    pa_xfree(u->output_window);
+    fftwf_free(u->output_window);
     for (c = 0; c < u->channels; ++c) {
         pa_aupdate_free(u->a_H[c]);
-        pa_xfree(u->overlap_accum[c]);
-        pa_xfree(u->input[c]);
+        fftwf_free(u->overlap_accum[c]);
+        fftwf_free(u->input[c]);
     }
     pa_xfree(u->a_H);
     pa_xfree(u->overlap_accum);
     pa_xfree(u->input);
-    pa_xfree(u->work_buffer);
-    pa_xfree(u->W);
+    fftwf_free(u->work_buffer);
+    fftwf_free(u->W);
     for (c = 0; c < u->channels; ++c) {
         pa_xfree(u->Xs[c]);
         for (size_t i = 0; i < 2; ++i)
-            pa_xfree(u->Hs[c][i]);
-        pa_xfree(u->Hs[c]);
+            fftwf_free(u->Hs[c][i]);
+        fftwf_free(u->Hs[c]);
     }
     pa_xfree(u->Xs);
     pa_xfree(u->Hs);



More information about the pulseaudio-commits mailing list