X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=resample_filter.c;h=1699ed2c03afcc84cc7b8b3e2e8a7f91aca13cc5;hp=61ffd2b6f5090419d90b27c9c8972fc97eba839d;hb=dda88dcb390a44e1f1f68f6248ed513c75dce4bf;hpb=093dda1824631372587d107d64601389027c6187 diff --git a/resample_filter.c b/resample_filter.c index 61ffd2b6..1699ed2c 100644 --- a/resample_filter.c +++ b/resample_filter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2014 Andre Noll + * Copyright (C) 2012 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -128,13 +128,7 @@ static int resample_init(struct filter_node *fn) int ret, converter; struct resample_context *ctx = fn->private_data; struct resample_filter_args_info *conf = fn->conf; - struct btr_node *btrn = fn->btrn; - ret = -E_RESAMPLE_EOF; - if (btr_no_parent(btrn)) - return ret; - if (btr_get_input_queue_size(btrn) == 0) - return 0; ret = resample_set_params(fn); if (ret < 0) return ret; @@ -216,14 +210,14 @@ static int resample_post_select(__a_unused struct sched *s, void *context) ret = check_wav_post_select(ctx->cwc); if (ret < 0) goto out; + ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL); + if (ret <= 0) + goto out; if (!ctx->src_state) { ret = resample_init(fn); if (ret <= 0) goto out; } - ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL); - if (ret <= 0) - goto out; if (ctx->source_sample_rate == conf->dest_sample_rate_arg) { /* * No resampling necessary. We do not splice ourselves out