ogg: use GLib instead of utils.h/log.h
This commit is contained in:
parent
401e77b258
commit
448ff32c96
@ -19,8 +19,6 @@
|
|||||||
/* TODO 'ogg' should probably be replaced with 'oggvorbis' in all instances */
|
/* TODO 'ogg' should probably be replaced with 'oggvorbis' in all instances */
|
||||||
|
|
||||||
#include "_ogg_common.h"
|
#include "_ogg_common.h"
|
||||||
#include "../utils.h"
|
|
||||||
#include "../log.h"
|
|
||||||
|
|
||||||
#ifndef HAVE_TREMOR
|
#ifndef HAVE_TREMOR
|
||||||
#include <vorbis/vorbisfile.h>
|
#include <vorbis/vorbisfile.h>
|
||||||
@ -37,6 +35,10 @@
|
|||||||
#define ov_time_seek_page(VF, S) (ov_time_seek_page(VF, (S)*1000))
|
#define ov_time_seek_page(VF, S) (ov_time_seek_page(VF, (S)*1000))
|
||||||
#endif /* HAVE_TREMOR */
|
#endif /* HAVE_TREMOR */
|
||||||
|
|
||||||
|
#include <glib.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
#define OGG_DECODE_USE_BIGENDIAN 1
|
#define OGG_DECODE_USE_BIGENDIAN 1
|
||||||
#else
|
#else
|
||||||
@ -254,8 +256,9 @@ oggvorbis_decode(struct decoder *decoder, struct input_stream *inStream)
|
|||||||
errorStr = "unknown error";
|
errorStr = "unknown error";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ERROR("Error decoding Ogg Vorbis stream: %s\n",
|
|
||||||
errorStr);
|
g_warning("Error decoding Ogg Vorbis stream: %s\n",
|
||||||
|
errorStr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
audio_format.bits = 16;
|
audio_format.bits = 16;
|
||||||
@ -330,10 +333,9 @@ static struct tag *oggvorbis_TagDup(const char *file)
|
|||||||
|
|
||||||
fp = fopen(file, "r");
|
fp = fopen(file, "r");
|
||||||
if (!fp) {
|
if (!fp) {
|
||||||
DEBUG("oggvorbis_TagDup: Failed to open file: '%s', %s\n",
|
|
||||||
file, strerror(errno));
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ov_open(fp, &vf, NULL, 0) < 0) {
|
if (ov_open(fp, &vf, NULL, 0) < 0) {
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user