ACK to both patches.

05.12.2014 13:38, Jason Newton wrote:
pa_memblockq_drop is guaranteed to drop the chunk we just extracted from the
memblockq which internally unrefs the chunk.
---
I checked just after pa_memblockq_peek and before pa_memblockq_drop calls with 
the following code:
     pa_log("chunk memblock %p refs: %d ours: %d ro: %d silence: %d",
         chunk->memblock,
         pa_atomic_load((pa_atomic_t *) chunk->memblock),
         pa_memblock_is_ours(chunk->memblock),
         pa_memblock_is_read_only(chunk->memblock),
         pa_memblock_is_silence(chunk->memblock)
     );
The refcnt was 2 at this point consistently and I set a watch point on the 
refcnt internal to the memblock
and noticed pa_memblockq_drop modifies this to 1.  This makes sense since we 
are telling the memblock to drop
the entire memblock (in bytes).

  src/modules/module-equalizer-sink.c | 2 --
  1 file changed, 2 deletions(-)

diff --git a/src/modules/module-equalizer-sink.c 
b/src/modules/module-equalizer-sink.c
index 3acca71..d6cc3aa 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;


--
Alexander E. Patrakov
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to