From: Andre Noll Date: Wed, 9 Apr 2014 18:07:07 +0000 (+0200) Subject: Merge branch 't/oggdec_latency_improvements' X-Git-Tag: v0.5.2~1 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=f76ab46a9216133332cb7e17d38d392caeca22cb;hp=72e9bdf7c5c09ca4c20cad56c68a9a155cceff43 Merge branch 't/oggdec_latency_improvements' 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. --- diff --git a/NEWS b/NEWS index ab53a176..77431a2f 100644 --- 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. diff --git a/oggdec_filter.c b/oggdec_filter.c index 1eaa7930..cec9c6c3 100644 --- a/oggdec_filter.c +++ b/oggdec_filter.c @@ -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) {