size_t *result_frames)
{
int ret, num_samples, out_samples;
+ float *in_float;
int16_t *out;
SRC_DATA data;
data.output_frames = num_frames * ctx->ratio + 1;
out_samples = data.output_frames * ctx->channels;
- data.data_in = para_malloc(num_samples * sizeof(float));
- src_short_to_float_array(in, data.data_in, num_samples);
+ in_float = para_malloc(num_samples * sizeof(float));
+ src_short_to_float_array(in, in_float, num_samples);
+ data.data_in = in_float;
data.data_out = para_malloc(out_samples * sizeof(float));
ret = src_process(ctx->src_state, &data);
- free(data.data_in);
+ free(in_float);
if (ret != 0) {
PARA_ERROR_LOG("%s\n", src_strerror(ret));
free(data.data_out);