diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2014-04-10 12:32:24 +0100 |
---|---|---|
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2014-04-10 12:35:03 +0100 |
commit | f588d14cdc75f23d8ca43fd978c20726152f4250 (patch) | |
tree | 7137f805c2be93e5aa4f5c49d451af780fe349ac /gst/audioresample | |
parent | 3d1fdf8dd84cac3c14f829a2e7d75bb12f5c52fa (diff) |
audioresample: reject 0 denominator when creating resampler
Diffstat (limited to 'gst/audioresample')
-rw-r--r-- | gst/audioresample/resample.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/audioresample/resample.c b/gst/audioresample/resample.c index 4410bdd9b..11171216d 100644 --- a/gst/audioresample/resample.c +++ b/gst/audioresample/resample.c @@ -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; |