From 448ff32c96d269f3605c6ddcddf68a92c12679ba Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 11 Nov 2008 21:33:01 +0100 Subject: ogg: use GLib instead of utils.h/log.h --- src/decoder/oggvorbis_plugin.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') 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 @@ -37,6 +35,10 @@ #define ov_time_seek_page(VF, S) (ov_time_seek_page(VF, (S)*1000)) #endif /* HAVE_TREMOR */ +#include +#include +#include + #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; -- cgit v1.2.3