[vlc-devel] [PATCH 1/3] soxr: add missing alloc check
Thomas Guillem
thomas at gllm.fr
Mon May 4 14:46:59 CEST 2020
---
modules/audio_filter/resampler/soxr.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/audio_filter/resampler/soxr.c b/modules/audio_filter/resampler/soxr.c
index 1d08d8527f7..757edd5d7e4 100644
--- a/modules/audio_filter/resampler/soxr.c
+++ b/modules/audio_filter/resampler/soxr.c
@@ -246,7 +246,11 @@ SoXR_Resample( filter_t *p_filter, soxr_t soxr, block_t *p_in, size_t i_olen )
p_out = p_in;
}
else
+ {
p_out = block_Alloc( i_olen * i_oframesize );
+ if( p_out == NULL )
+ goto error;
+ }
soxr_error_t error = soxr_process( soxr, p_in ? p_in->p_buffer : NULL,
i_ilen, &i_idone, p_out->p_buffer,
--
2.20.1
More information about the vlc-devel
mailing list