X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=oggdec_filter.c;h=b158a5e17444112148bd1d33d90dba87e912274e;hp=689fc7aac57739ba23989616d4e8cbfb1ed761b1;hb=343a65bc48b4e0cda4d9a14afcd7e96cca9c5de9;hpb=d9e608504d9d0e71380907559546e211c4f0ce55 diff --git a/oggdec_filter.c b/oggdec_filter.c index 689fc7aa..b158a5e1 100644 --- a/oggdec_filter.c +++ b/oggdec_filter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2008 Andre Noll + * Copyright (C) 2005-2009 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -11,6 +11,7 @@ #include "oggdec_filter.cmdline.h" #include "list.h" #include "sched.h" +#include "ggo.h" #include "filter.h" #include "error.h" #include "string.h" @@ -124,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 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; @@ -195,9 +198,15 @@ err: */ void oggdec_filter_init(struct filter *f) { + struct oggdec_filter_args_info dummy; + + oggdec_cmdline_parser_init(&dummy); f->open = ogg_open; f->close = ogg_close; f->convert = ogg_convert; - f->print_help = oggdec_cmdline_parser_print_help; f->parse_config = oggdec_parse_config; + f->help = (struct ggo_help) { + .short_help = oggdec_filter_args_info_help, + .detailed_help = oggdec_filter_args_info_detailed_help + }; }