mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
resampler: limit max number of taps
Don't use more taps than the input size.
This commit is contained in:
parent
a81d450b7e
commit
b4a5001e3c
1 changed files with 6 additions and 1 deletions
|
@ -257,7 +257,6 @@ gst_resampler_init (GstResampler * resampler,
|
|||
|
||||
resampler->in_size = in_size;
|
||||
resampler->out_size = out_size;
|
||||
resampler->max_taps = n_taps;
|
||||
resampler->n_phases = n_phases;
|
||||
|
||||
params.method = method;
|
||||
|
@ -311,6 +310,12 @@ gst_resampler_init (GstResampler * resampler,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (n_taps > in_size)
|
||||
n_taps = in_size;
|
||||
|
||||
resampler->max_taps = n_taps;
|
||||
|
||||
resampler_calculate_taps (¶ms);
|
||||
|
||||
#if 0
|
||||
|
|
Loading…
Reference in a new issue