mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
audioresample: reject 0 denominator when creating resampler
Coverity 1195140, 1195139, 1195138
This commit is contained in:
parent
3d1fdf8dd8
commit
f588d14cdc
1 changed files with 5 additions and 0 deletions
|
@ -988,6 +988,11 @@ speex_resampler_init_frac (spx_uint32_t nb_channels, spx_uint32_t ratio_num,
|
|||
*err = RESAMPLER_ERR_INVALID_ARG;
|
||||
return NULL;
|
||||
}
|
||||
if (ratio_den == 0) {
|
||||
if (err)
|
||||
*err = RESAMPLER_ERR_INVALID_ARG;
|
||||
return NULL;
|
||||
}
|
||||
switch (sinc_filter_mode) {
|
||||
case RESAMPLER_SINC_FILTER_INTERPOLATED:
|
||||
use_full_sinc_table = 0;
|
||||
|
|
Loading…
Reference in a new issue