]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - mp3dec_filter.c
Switch audiod over to the buffer tree API.
[paraslash.git] / mp3dec_filter.c
index a6a628ec2ee939b4d9bb86b171d51d0ec843f8d6..2472b2cfa70b916d69b7d9c962aceb79050acd38 100644 (file)
@@ -198,7 +198,7 @@ next_buffer:
        iqs = btr_get_input_queue_size(btrn);
        if (need_bad_data_delay(pmd, iqs))
                return;
-       ret = btr_node_status(btrn, fn->min_iqs);
+       ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
        if (ret < 0)
                goto err;
        if (ret == 0)
@@ -257,9 +257,8 @@ next_frame:
        goto next_frame;
 err:
        assert(ret < 0);
-       mp3dec_close(fn);
        t->error = ret;
-       btr_del_node(btrn);
+       btr_remove_node(btrn);
 }
 
 static void mp3dec_open(struct filter_node *fn)
@@ -318,6 +317,11 @@ static int mp3dec_execute(struct btr_node *btrn, const char *cmd, char **result)
        }
        return -ERRNO_TO_PARA_ERROR(ENOTSUP);
 }
+
+static void mp3dec_free_config(void *conf)
+{
+       mp3dec_cmdline_parser_free(conf);
+}
 /**
  * The init function of the mp3dec filter.
  *
@@ -334,6 +338,7 @@ void mp3dec_filter_init(struct filter *f)
        f->convert = mp3dec;
        f->close = mp3dec_close;
        f->parse_config = mp3dec_parse_config;
+       f->free_config = mp3dec_free_config;
        f->pre_select = generic_filter_pre_select;
        f->post_select = mp3dec_post_select;
        f->execute = mp3dec_execute;