[PATCH] sink-input: Don't access resampler to get silence memchunk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Arun Raghavan <git@xxxxxxxxxxxxxxxx>

There doesn't appear to be a good reason to restrict the memchunk length
to the resample max block size -- we're going to have the memory around
anyway. Moreover, callers of pa_sink_input_get_silence() don't seem to
actually care about the chunk itself, just the memblock for creating
their own pa_memblockq.
---
 src/pulsecore/sink-input.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 539ae17..57e8877 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -2104,14 +2104,12 @@ pa_memchunk* pa_sink_input_get_silence(pa_sink_input *i, pa_memchunk *ret) {
     pa_assert_ctl_context();
     pa_assert(ret);
 
-    /* FIXME: Shouldn't access resampler object from main context! */
-
     pa_silence_memchunk_get(
                 &i->core->silence_cache,
                 i->core->mempool,
                 ret,
                 &i->sample_spec,
-                i->thread_info.resampler ? pa_resampler_max_block_size(i->thread_info.resampler) : 0);
+                0);
 
     return ret;
 }
-- 
2.5.0



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux