gui: Use variable-sized input buffer for the audiod pipe.
[paraslash.git] / oggdec_filter.c
index 7c79fd5..b158a5e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2009 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -125,7 +125,9 @@ static ssize_t ogg_convert(char *inbuffer, size_t len, struct filter_node *fn)
 
        if (!pod->vf) {
                int ib = 1024 * conf->initial_buffer_arg; /* initial buffer */
-               if (len <ib && !*fn->fc->input_error) {
+               if (*fn->fc->input_error < 0)
+                       return *fn->fc->input_error;
+               if (len < ib) {
                        PARA_DEBUG_LOG("initial input buffer %zd/%d, "
                                "waiting for more data\n", len, ib);
                        return 0;
@@ -204,8 +206,6 @@ void oggdec_filter_init(struct filter *f)
        f->convert = ogg_convert;
        f->parse_config = oggdec_parse_config;
        f->help = (struct ggo_help) {
-               .purpose = oggdec_filter_args_info_purpose,
-               .usage = oggdec_filter_args_info_usage,
                .short_help = oggdec_filter_args_info_help,
                .detailed_help = oggdec_filter_args_info_detailed_help
        };