From 0d9d82a932d7fc022bfc410e206fb8edb6f3db03 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 24 Dec 2008 03:08:39 +0100 Subject: pcm_utils: check pcm_convert()==0 It is illegal to pass an empty audio buffer around. pcm_resample() sometimes seems to result in 0 samples, maybe related to libsamplerate. To work around that problem, add special checks after both pcm_convert() invocations. Removed the pcm_resample()==0 checks from pcm_convert(). --- src/pcm_utils.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/pcm_utils.c') diff --git a/src/pcm_utils.c b/src/pcm_utils.c index 2fb5f6c3f..f73df8aef 100644 --- a/src/pcm_utils.c +++ b/src/pcm_utils.c @@ -379,8 +379,6 @@ pcm_convert_16(const struct audio_format *src_format, dest_format->sample_rate, dest_buffer, dest_size, &state->resample); - if (len == 0) - exit(EXIT_FAILURE); } return len; @@ -421,8 +419,6 @@ pcm_convert_24(const struct audio_format *src_format, dest_format->sample_rate, (int32_t*)dest_buffer, dest_size, &state->resample); - if (len == 0) - exit(EXIT_FAILURE); } return len; -- cgit v1.2.3