resampler: limit max number of taps
Don't use more taps than the input size.
This commit is contained in:
parent
a81d450b7e
commit
b4a5001e3c
@ -257,7 +257,6 @@ gst_resampler_init (GstResampler * resampler,
|
|||||||
|
|
||||||
resampler->in_size = in_size;
|
resampler->in_size = in_size;
|
||||||
resampler->out_size = out_size;
|
resampler->out_size = out_size;
|
||||||
resampler->max_taps = n_taps;
|
|
||||||
resampler->n_phases = n_phases;
|
resampler->n_phases = n_phases;
|
||||||
|
|
||||||
params.method = method;
|
params.method = method;
|
||||||
@ -311,6 +310,12 @@ gst_resampler_init (GstResampler * resampler,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (n_taps > in_size)
|
||||||
|
n_taps = in_size;
|
||||||
|
|
||||||
|
resampler->max_taps = n_taps;
|
||||||
|
|
||||||
resampler_calculate_taps (¶ms);
|
resampler_calculate_taps (¶ms);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user