]> git.tue.mpg.de Git - paraslash.git/commitdiff
filter: Register the filter chain as the last task.
authorAndre Noll <maan@systemlinux.org>
Sun, 6 Sep 2009 20:19:31 +0000 (22:19 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 6 Sep 2009 20:19:31 +0000 (22:19 +0200)
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.

filter.c

index 88e2336b0a4b8eed81dd38381427968329673716..98cef2fa71a0b79fe1d88d8f6463ef00e75a493e 100644 (file)
--- 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);