gui: Make curses_active a bool.
[paraslash.git] / fecdec_filter.c
index 09a2fabd7bb418d7e94f8bea2cac4fb5d9826bfa..b8e130d4ed124ad67fb6550073e3122be7a346be 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009-2011 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2009-2014 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -7,7 +7,6 @@
 /** \file fecdec_filter.c A filter that fec-decodes an audio stream. */
 
 #include <regex.h>
-#include <stdbool.h>
 
 #include "para.h"
 #include "error.h"
@@ -410,7 +409,7 @@ static int dispatch_slice(char *buf, size_t len, struct fec_header *h,
        ret = fec_new(k, n, &pfd->fec);
        if (ret < 0)
                return ret;
-       pfd->btrp = btr_pool_new("fecdec", 64 * 1024);
+       pfd->btrp = btr_pool_new("fecdec", 128 * 1024);
        /* decode and clear the first group */
        ret = decode_group(pfd->first_complete_group, fn);
        if (ret < 0)
@@ -437,7 +436,7 @@ static void fecdec_close(struct filter_node *fn)
        fn->private_data = NULL;
 }
 
-static void fecdec_post_select(__a_unused struct sched *s, struct task *t)
+static int fecdec_post_select(__a_unused struct sched *s, struct task *t)
 {
        struct filter_node *fn = container_of(t, struct filter_node, task);
        struct btr_node *btrn = fn->btrn;
@@ -469,9 +468,9 @@ next_buffer:
        btr_consume(btrn, FEC_HEADER_SIZE + h.slice_bytes);
        goto next_buffer;
 out:
-       t->error = ret;
        if (ret < 0)
-               btr_remove_node(btrn);
+               btr_remove_node(&fn->btrn);
+       return ret;
 }
 
 static void fecdec_open(struct filter_node *fn)