]> git.tue.mpg.de Git - paraslash.git/commitdiff
flacdec: Switch to the alternative post select method.
authorAndre Noll <maan@systemlinux.org>
Sun, 31 Mar 2013 13:20:13 +0000 (13:20 +0000)
committerAndre Noll <maan@systemlinux.org>
Tue, 30 Apr 2013 12:12:45 +0000 (14:12 +0200)
flacdec_filter.c

index b0f499c366e5abe31f8b836025950e1cef5c46f1..363c73bb15d401c25217d88308b03c12df13aa6f 100644 (file)
@@ -216,7 +216,7 @@ static void flacdec_pre_select(struct sched *s, struct task *t)
                return sched_min_delay(s);
 }
 
-static void flacdec_post_select(__a_unused struct sched *s, struct task *t)
+static int flacdec_post_select(__a_unused struct sched *s, struct task *t)
 {
        struct filter_node *fn = container_of(t, struct filter_node, task);
        struct private_flacdec_data *pfd = fn->private_data;
@@ -224,7 +224,7 @@ static void flacdec_post_select(__a_unused struct sched *s, struct task *t)
        int ret;
 
        if (output_queue_full(btrn))
-               return;
+               return 0;
        ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
        if (ret < 0 && ret != -E_BTR_EOF) /* fatal error */
                goto out;
@@ -255,9 +255,9 @@ static void flacdec_post_select(__a_unused struct sched *s, struct task *t)
        fn->min_iqs = 0;
        ret = 1;
 out:
-       t->error = ret;
        if (ret < 0)
                btr_remove_node(&fn->btrn);
+       return ret;
 }
 
 static void flacdec_close(struct filter_node *fn)
@@ -296,6 +296,7 @@ void flacdec_filter_init(struct filter *f)
        f->open = flacdec_open;
        f->close = flacdec_close;
        f->pre_select = flacdec_pre_select;
-       f->post_select = flacdec_post_select;
+       f->new_post_select = flacdec_post_select;
+       f->post_select = NULL;
        f->execute = flacdec_execute;
 }