Merge branch 't/oggdec_latency_improvements'
authorAndre Noll <maan@systemlinux.org>
Wed, 9 Apr 2014 18:07:07 +0000 (20:07 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 9 Apr 2014 18:07:55 +0000 (20:07 +0200)
A single commit which was cooking since 2014-03-11.

* t/oggdec_latency_improvements:
  oggdec: Decode only OGGDEC_OUTPUT_CHUNK_SIZE many bytes per iteration.

NEWS
oggdec_filter.c

diff --git a/NEWS b/NEWS
index ab53a17..77431a2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,7 @@ fair number of smaller fixes and improvements not mentioned here.
        - The man pages of para_audiod, para_filter, para_recv, and
          para_write contain the relevant options for receivers, filters,
          writers. This broke in 0.5.0.
+       - ogg/vorbis latency improvements.
        - Improved user manual.
        - Minor fixes to avoid clang warnings.
 
index 1eaa793..cec9c6c 100644 (file)
@@ -236,13 +236,8 @@ static int ogg_post_select(__a_unused struct sched *s, struct task *t)
                        break;
                fn->min_iqs = 0;
                have += ret;
-               if (have < OGGDEC_OUTPUT_CHUNK_SIZE)
-                       continue;
-               if (btr_get_output_queue_size(btrn) > OGGDEC_MAX_OUTPUT_SIZE)
+               if (have >= OGGDEC_OUTPUT_CHUNK_SIZE)
                        break;
-               btr_add_output(buf, have, btrn);
-               buf = para_malloc(OGGDEC_OUTPUT_CHUNK_SIZE);
-               have = 0;
        }
        pod->have_more = (ret > 0);
        if (have > 0) {