From: Andre Noll Date: Sun, 6 Sep 2009 20:19:31 +0000 (+0200) Subject: filter: Register the filter chain as the last task. X-Git-Tag: v0.3.5~5 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=06497812fbb743863b865762338a26cdcfa10ea6 filter: Register the filter chain as the last task. Without this patch, the command para_filter -f mp3dec < foo.mp3 > /dev/null would take several minutes because the stdin buffer is usually full and the stdout buffer empty which causes select() to be called with empty fd sets, resulting in a one second timeout. --- diff --git a/filter.c b/filter.c index 88e2336b..98cef2fa 100644 --- a/filter.c +++ b/filter.c @@ -186,8 +186,8 @@ int main(int argc, char *argv[]) sot->input_error = &fc->task.error; register_task(&sit->task); - register_task(&fc->task); register_task(&sot->task); + register_task(&fc->task); s.default_timeout.tv_sec = 1; s.default_timeout.tv_usec = 0; ret = schedule(&s);