next_buffer:
t->error = 0;
- ret = prepare_filter_node(btrn, fn->min_iqs);
+ ret = prepare_filter_node(fn);
if (ret < 0)
goto err;
if (ret == 0)
int check_filter_arg(char *filter_arg, void **conf);
void filter_post_select(__a_unused struct sched *s, struct task *t);
void print_filter_helps(int detailed);
-int prepare_filter_node(struct btr_node *btrn, size_t min_len);
+int prepare_filter_node(struct filter_node *fn);
static inline void write_int16_host_endian(char *buf, int val)
{
/** 640K ought to be enough for everybody ;) */
#define FILTER_MAX_PENDING (640 * 1024)
-int prepare_filter_node(struct btr_node *btrn, size_t min_len)
+int prepare_filter_node(struct filter_node *fn)
{
+ struct btr_node *btrn = fn->btrn;
size_t iqs;
if (btr_eof(btrn))
if (btr_bytes_pending(btrn) > FILTER_MAX_PENDING)
return 0;
iqs = btr_get_input_queue_size(btrn);
- if (iqs < min_len && !btr_no_parent(btrn))
+ if (iqs < fn->min_iqs && !btr_no_parent(btrn))
return 0;
assert(iqs != 0);
/* avoid "buffer too small" errors from the decoder */
- btr_merge(btrn, min_len);
+ btr_merge(btrn, fn->min_iqs);
return 1;
}
iqs = btr_get_input_queue_size(btrn);
if (need_bad_data_delay(pmd, iqs))
return;
- ret = prepare_filter_node(btrn, fn->min_iqs);
+ ret = prepare_filter_node(fn);
if (ret < 0)
goto err;
if (ret == 0)
char *in;
t->error = 0;
- ret = prepare_filter_node(btrn, fn->min_iqs);
+ ret = prepare_filter_node(fn);
if (ret < 0)
goto err;
if (ret == 0)
next_buffer:
t->error = 0;
- ret = prepare_filter_node(btrn, fn->min_iqs);
+ ret = prepare_filter_node(fn);
if (ret < 0)
goto err;
if (ret == 0)