From 865757835ec586963847c630790d636c35914fa8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 12 Nov 2008 07:02:29 +0100 Subject: mpc: use GLib instead of utils.h/log.h Don't use deprecated MPD libraries. --- src/decoder/mpc_plugin.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/decoder/mpc_plugin.c b/src/decoder/mpc_plugin.c index c4142555b..81a82b98e 100644 --- a/src/decoder/mpc_plugin.c +++ b/src/decoder/mpc_plugin.c @@ -17,10 +17,9 @@ */ #include "../decoder_api.h" -#include "../utils.h" -#include "../log.h" #include +#include typedef struct _MpcCallbackData { struct input_stream *inStream; @@ -135,7 +134,7 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream) if ((ret = mpc_streaminfo_read(&info, &reader)) != ERROR_CODE_OK) { if (decoder_get_command(mpd_decoder) != DECODE_COMMAND_STOP) - ERROR("Not a valid musepack stream\n"); + g_warning("Not a valid musepack stream\n"); return; } @@ -143,7 +142,7 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream) if (!mpc_decoder_initialize(&decoder, &info)) { if (decoder_get_command(mpd_decoder) != DECODE_COMMAND_STOP) - ERROR("Not a valid musepack stream\n"); + g_warning("Not a valid musepack stream\n"); return; } @@ -246,10 +245,8 @@ static float mpcGetTime(const char *file) mpc_streaminfo_init(&info); - if (!input_stream_open(&inStream, file)) { - DEBUG("mpcGetTime: Failed to open file: %s\n", file); + if (!input_stream_open(&inStream, file)) return -1; - } if (mpc_streaminfo_read(&info, &reader) != ERROR_CODE_OK) { input_stream_close(&inStream); @@ -269,8 +266,8 @@ static struct tag *mpcTagDup(const char *file) float total_time = mpcGetTime(file); if (total_time < 0) { - DEBUG("mpcTagDup: Failed to get Songlength of file: %s\n", - file); + g_debug("mpcTagDup: Failed to get Songlength of file: %s\n", + file); return NULL; } -- cgit v1.2.3