spxdec: Switch to the alternative post select method.
authorAndre Noll <maan@systemlinux.org>
Sun, 31 Mar 2013 13:37:13 +0000 (13:37 +0000)
committerAndre Noll <maan@systemlinux.org>
Tue, 30 Apr 2013 12:12:45 +0000 (14:12 +0200)
spxdec_filter.c

index 6bd4114..3bf547e 100644 (file)
@@ -238,7 +238,7 @@ static int compute_skip_samples(ogg_page *og, struct private_spxdec_data *psd)
        return ret;
 }
 
-static void speexdec_post_select(__a_unused struct sched *s, struct task *t)
+static int speexdec_post_select(__a_unused struct sched *s, struct task *t)
 {
        struct filter_node *fn = container_of(t, struct filter_node, task);
        struct private_spxdec_data *psd = fn->private_data;
@@ -249,7 +249,6 @@ static void speexdec_post_select(__a_unused struct sched *s, struct task *t)
        size_t nbytes;
 
 next_buffer:
-       t->error = 0;
        ret = ns = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
        btr_merge(btrn, fn->min_iqs);
        if (!psd->shi.state) {
@@ -290,10 +289,9 @@ next_buffer:
                goto next_buffer;
        ret = ns;
 fail:
-       if (ret < 0) {
-               t->error = ret;
+       if (ret < 0)
                btr_remove_node(&fn->btrn);
-       }
+       return ret;
 }
 
 /**
@@ -306,6 +304,7 @@ void spxdec_filter_init(struct filter *f)
        f->open = spxdec_open;
        f->close = speexdec_close;
        f->pre_select = generic_filter_pre_select;
-       f->post_select = speexdec_post_select;
+       f->new_post_select = speexdec_post_select;
+       f->post_select = NULL;
        f->execute = speexdec_execute;
 }