X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=resample_filter.c;h=5ad584ded50eaad435f5afdfeedccac9f40bcd75;hp=9d6743f12c61beceb13bb42a7545cf03d8f16d2b;hb=b3644a3f5de245609dc608a947ed71e2f75b2fd5;hpb=ff12b505b227585daf5aecc822d6b2e8841c2be7 diff --git a/resample_filter.c b/resample_filter.c index 9d6743f1..5ad584de 100644 --- a/resample_filter.c +++ b/resample_filter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Andre Noll + * Copyright (C) 2012-2013 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -202,7 +202,7 @@ static int resample_frames(int16_t *in, size_t num_frames, bool have_more, return data.input_frames_used; } -static void resample_post_select(__a_unused struct sched *s, struct task *t) +static int resample_post_select(__a_unused struct sched *s, struct task *t) { int ret; struct filter_node *fn = container_of(t, struct filter_node, task); @@ -231,7 +231,8 @@ static void resample_post_select(__a_unused struct sched *s, struct task *t) * btr exec mechanism for the destination samplerate and the * channel count. */ - return btr_pushdown(btrn); + btr_pushdown(btrn); + return 0; } btr_merge(btrn, fn->min_iqs); in_bytes = btr_next_buffer(btrn, (char **)&in); @@ -246,14 +247,14 @@ static void resample_post_select(__a_unused struct sched *s, struct task *t) goto out; btr_consume(btrn, ret * 2 * ctx->channels); btr_add_output((char *)out, num_frames * 2 * ctx->channels, btrn); - return; + return 0; out: if (ret < 0) { - t->error = ret; btr_remove_node(&fn->btrn); /* This releases the check_wav btr node */ check_wav_post_select(ctx->cwc); } + return ret; } static int resample_parse_config(int argc, char **argv, void **config) @@ -309,8 +310,5 @@ void resample_filter_init(struct filter *f) f->parse_config = resample_parse_config; f->free_config = resample_free_config; f->execute = resample_execute; - f->help = (struct ggo_help) { - .short_help = resample_filter_args_info_help, - .detailed_help = resample_filter_args_info_detailed_help - }; + f->help = (struct ggo_help)DEFINE_GGO_HELP(resample_filter); }