Commit 2d6f4690 authored by Max Kellermann's avatar Max Kellermann

decoder_api: use GLib instead of utils.h

parent 2bc01440
...@@ -27,9 +27,11 @@ ...@@ -27,9 +27,11 @@
#include "normalize.h" #include "normalize.h"
#include "pipe.h" #include "pipe.h"
#include <assert.h>
#include <glib.h> #include <glib.h>
#include <assert.h>
#include <stdlib.h>
void decoder_initialized(struct decoder * decoder, void decoder_initialized(struct decoder * decoder,
const struct audio_format *audio_format, const struct audio_format *audio_format,
bool seekable, float total_time) bool seekable, float total_time)
...@@ -239,9 +241,8 @@ decoder_data(struct decoder *decoder, ...@@ -239,9 +241,8 @@ decoder_data(struct decoder *decoder,
pcm_convert_size(&dc.in_audio_format, length, pcm_convert_size(&dc.in_audio_format, length,
&dc.out_audio_format); &dc.out_audio_format);
if (out_length > conv_buffer_size) { if (out_length > conv_buffer_size) {
if (conv_buffer != NULL) g_free(conv_buffer);
free(conv_buffer); conv_buffer = g_malloc(out_length);
conv_buffer = xmalloc(out_length);
conv_buffer_size = out_length; conv_buffer_size = out_length;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment