aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-11 21:33:01 +0100
committerMax Kellermann <max@duempel.org>2008-11-11 21:33:01 +0100
commit448ff32c96d269f3605c6ddcddf68a92c12679ba (patch)
treed65b4c42cc75d0228e81fb64f62251d42750b4c0 /src
parent401e77b258ff549b71a7fcaedf152f2e4e80612c (diff)
downloadmpd-448ff32c96d269f3605c6ddcddf68a92c12679ba.tar.gz
mpd-448ff32c96d269f3605c6ddcddf68a92c12679ba.tar.xz
mpd-448ff32c96d269f3605c6ddcddf68a92c12679ba.zip
ogg: use GLib instead of utils.h/log.h
Diffstat (limited to 'src')
-rw-r--r--src/decoder/oggvorbis_plugin.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/decoder/oggvorbis_plugin.c b/src/decoder/oggvorbis_plugin.c
index bb0c7617d..5aa777065 100644
--- a/src/decoder/oggvorbis_plugin.c
+++ b/src/decoder/oggvorbis_plugin.c
@@ -19,8 +19,6 @@
/* TODO 'ogg' should probably be replaced with 'oggvorbis' in all instances */
#include "_ogg_common.h"
-#include "../utils.h"
-#include "../log.h"
#ifndef HAVE_TREMOR
#include <vorbis/vorbisfile.h>
@@ -37,6 +35,10 @@
#define ov_time_seek_page(VF, S) (ov_time_seek_page(VF, (S)*1000))
#endif /* HAVE_TREMOR */
+#include <glib.h>
+#include <errno.h>
+#include <stdlib.h>
+
#ifdef WORDS_BIGENDIAN
#define OGG_DECODE_USE_BIGENDIAN 1
#else
@@ -254,8 +256,9 @@ oggvorbis_decode(struct decoder *decoder, struct input_stream *inStream)
errorStr = "unknown error";
break;
}
- ERROR("Error decoding Ogg Vorbis stream: %s\n",
- errorStr);
+
+ g_warning("Error decoding Ogg Vorbis stream: %s\n",
+ errorStr);
return;
}
audio_format.bits = 16;
@@ -330,10 +333,9 @@ static struct tag *oggvorbis_TagDup(const char *file)
fp = fopen(file, "r");
if (!fp) {
- DEBUG("oggvorbis_TagDup: Failed to open file: '%s', %s\n",
- file, strerror(errno));
return NULL;
}
+
if (ov_open(fp, &vf, NULL, 0) < 0) {
fclose(fp);
return NULL;