Fixed segmentation fault in fractional_decimator_ff
This commit is contained in:
parent
c3e5d3f433
commit
d56fc2d799
2 changed files with 2 additions and 0 deletions
1
csdr.c
1
csdr.c
|
@ -1372,6 +1372,7 @@ int main(int argc, char *argv[])
|
|||
fread(input_buffer+(the_bufsize-d.input_processed), sizeof(float), d.input_processed, stdin);
|
||||
fractional_decimator_ff(input_buffer, output_buffer, the_bufsize, &d);
|
||||
fwrite(output_buffer, sizeof(float), d.output_size, stdout);
|
||||
//fprintf(stderr, "os = %d, ip = %d\n", d.output_size, d.input_processed);
|
||||
TRY_YIELD;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -714,6 +714,7 @@ fractional_decimator_ff_t fractional_decimator_ff_init(float rate, int num_poly_
|
|||
d.rate = rate;
|
||||
d.taps = taps;
|
||||
d.taps_length = taps_length;
|
||||
d.input_processed = 0;
|
||||
return d;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue