aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm_resample_libsamplerate.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-14 14:37:31 +0100
committerMax Kellermann <max@duempel.org>2009-03-14 14:37:31 +0100
commitf711198ab33e485113cbe14b162b4c1436d56ab1 (patch)
tree30d505327be3bd9aa0de2e207ed41f2317b91eab /src/pcm_resample_libsamplerate.c
parent8df0a29cbc7704da146dc53c34c8e29bf625f834 (diff)
downloadmpd-f711198ab33e485113cbe14b162b4c1436d56ab1.tar.gz
mpd-f711198ab33e485113cbe14b162b4c1436d56ab1.tar.xz
mpd-f711198ab33e485113cbe14b162b4c1436d56ab1.zip
pcm_resample: return NULL on failure
Changed "0" to "NULL".
Diffstat (limited to 'src/pcm_resample_libsamplerate.c')
-rw-r--r--src/pcm_resample_libsamplerate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pcm_resample_libsamplerate.c b/src/pcm_resample_libsamplerate.c
index cb84f6a49..26482811c 100644
--- a/src/pcm_resample_libsamplerate.c
+++ b/src/pcm_resample_libsamplerate.c
@@ -135,7 +135,7 @@ pcm_resample_16(struct pcm_resample_state *state,
/* there was an error previously, and nothing has changed */
if (state->error)
- return 0;
+ return NULL;
data->input_frames = src_size / sizeof(*src_buffer) / channels;
data_in_size = data->input_frames * sizeof(float) * channels;
@@ -153,7 +153,7 @@ pcm_resample_16(struct pcm_resample_state *state,
g_warning("error processing samples with libsamplerate: %s",
src_strerror(error));
state->error = true;
- return 0;
+ return NULL;
}
*dest_size_r = data->output_frames_gen *
@@ -205,7 +205,7 @@ pcm_resample_32(struct pcm_resample_state *state,
/* there was an error previously, and nothing has changed */
if (state->error)
- return 0;
+ return NULL;
data->input_frames = src_size / sizeof(*src_buffer) / channels;
data_in_size = data->input_frames * sizeof(float) * channels;
@@ -223,7 +223,7 @@ pcm_resample_32(struct pcm_resample_state *state,
g_warning("error processing samples with libsamplerate: %s",
src_strerror(error));
state->error = true;
- return 0;
+ return NULL;
}
*dest_size_r = data->output_frames_gen *