[pulseaudio-discuss] [PATCH RFCv3 47/51] protocol-native: Make sink_input_pop_cb() return entire chunk

Peter Meerwald pmeerw at pmeerw.net
Tue Nov 4 15:26:42 PST 2014


according to specification: "If more data is already ready, it is better to return
the full block."

Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
---
 src/pulsecore/protocol-native.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index a52f725..1da84ff 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -1662,8 +1662,6 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
     if (pa_memblockq_peek(s->memblockq, chunk) < 0)
         return -1;
 
-    chunk->length = PA_MIN(nbytes, chunk->length);
-
     if (i->thread_info.underrun_for > 0)
         pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_STARTED, NULL, 0, NULL, NULL);
 
-- 
1.9.1



More information about the pulseaudio-discuss mailing list