Commit 457301d9 authored by Max Kellermann's avatar Max Kellermann

compress: use GLib instead of utils.h

parent dec4e4ca
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
*/ */
#include "compress.h" #include "compress.h"
#include "utils.h"
#include <glib.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
...@@ -66,7 +67,7 @@ void CompressCfg(int show_mon, int anticlip, int target, int gainmax, ...@@ -66,7 +67,7 @@ void CompressCfg(int show_mon, int anticlip, int target, int gainmax,
prefs.buckets = buckets; prefs.buckets = buckets;
/* Allocate the peak structure */ /* Allocate the peak structure */
peaks = xrealloc(peaks, sizeof(int)*prefs.buckets); peaks = g_realloc(peaks, sizeof(int)*prefs.buckets);
if (prefs.buckets > lastsize) if (prefs.buckets > lastsize)
memset(peaks + lastsize, 0, sizeof(int)*(prefs.buckets memset(peaks + lastsize, 0, sizeof(int)*(prefs.buckets
...@@ -165,8 +166,7 @@ void CompressFree(void) ...@@ -165,8 +166,7 @@ void CompressFree(void)
} }
#endif #endif
if (peaks) g_free(peaks);
free(peaks);
} }
void CompressDo(void *data, unsigned int length) void CompressDo(void *data, unsigned int 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