[pulseaudio-commits] r2547 - /trunk/src/pulsecore/memblockq.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue Jun 17 13:07:52 PDT 2008


Author: lennart
Date: Tue Jun 17 22:07:51 2008
New Revision: 2547

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2547&root=pulseaudio&view=rev
Log:
limit the prebuf value by tlength

Modified:
    trunk/src/pulsecore/memblockq.c

Modified: trunk/src/pulsecore/memblockq.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/memblockq.c?rev=2547&root=pulseaudio&r1=2546&r2=2547&view=diff
==============================================================================
--- trunk/src/pulsecore/memblockq.c (original)
+++ trunk/src/pulsecore/memblockq.c Tue Jun 17 22:07:51 2008
@@ -786,6 +786,9 @@
     if (bq->tlength > bq->maxlength)
         bq->tlength = bq->maxlength;
 
+    if (bq->prebuf > bq->tlength)
+        pa_memblockq_set_prebuf(bq, bq->tlength);
+
     if (bq->minreq > bq->tlength)
         pa_memblockq_set_minreq(bq, bq->tlength);
 
@@ -803,8 +806,8 @@
     if (prebuf > 0 && bq->prebuf < bq->base)
         bq->prebuf = bq->base;
 
-    if (bq->prebuf > bq->maxlength)
-        bq->prebuf = bq->maxlength;
+    if (bq->prebuf > bq->tlength)
+        bq->prebuf = bq->tlength;
 
     if (bq->prebuf <= 0 || pa_memblockq_get_length(bq) >= bq->prebuf)
         bq->in_prebuf = FALSE;




More information about the pulseaudio-commits mailing list