aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_api.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-03 14:51:28 +0100
committerMax Kellermann <max@duempel.org>2009-01-03 14:51:28 +0100
commit2d6f4690913857201965a3a306ede5caca655e79 (patch)
tree0763a5a4350e0464f717141070369c4035f4f226 /src/decoder_api.c
parent2bc01440231242c8c7c0c265b575e58d35d354c5 (diff)
downloadmpd-2d6f4690913857201965a3a306ede5caca655e79.tar.gz
mpd-2d6f4690913857201965a3a306ede5caca655e79.tar.xz
mpd-2d6f4690913857201965a3a306ede5caca655e79.zip
decoder_api: use GLib instead of utils.h
Diffstat (limited to 'src/decoder_api.c')
-rw-r--r--src/decoder_api.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/decoder_api.c b/src/decoder_api.c
index dd7096017..eba2387c3 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -27,9 +27,11 @@
#include "normalize.h"
#include "pipe.h"
-#include <assert.h>
#include <glib.h>
+#include <assert.h>
+#include <stdlib.h>
+
void decoder_initialized(struct decoder * decoder,
const struct audio_format *audio_format,
bool seekable, float total_time)
@@ -239,9 +241,8 @@ decoder_data(struct decoder *decoder,
pcm_convert_size(&dc.in_audio_format, length,
&dc.out_audio_format);
if (out_length > conv_buffer_size) {
- if (conv_buffer != NULL)
- free(conv_buffer);
- conv_buffer = xmalloc(out_length);
+ g_free(conv_buffer);
+ conv_buffer = g_malloc(out_length);
conv_buffer_size = out_length;
}