From ef80464c0c30cffe9e507c45fd14d4a5da5406ae Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 12 Nov 2008 08:38:04 +0100 Subject: ogg: revert "use ogg_fopen() instead of ogg_open()" Unfortunately, ov_fopen() is not supported by libvorbis versions older than 1.2. --- src/decoder/oggvorbis_plugin.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/decoder') diff --git a/src/decoder/oggvorbis_plugin.c b/src/decoder/oggvorbis_plugin.c index f6be8562a..5aa777065 100644 --- a/src/decoder/oggvorbis_plugin.c +++ b/src/decoder/oggvorbis_plugin.c @@ -327,16 +327,19 @@ oggvorbis_decode(struct decoder *decoder, struct input_stream *inStream) static struct tag *oggvorbis_TagDup(const char *file) { - char *duplicated; - int err; struct tag *ret; + FILE *fp; OggVorbis_File vf; - duplicated = g_strdup(file); - err = ov_fopen(duplicated, &vf); - g_free(duplicated); - if (err < 0) + fp = fopen(file, "r"); + if (!fp) { return NULL; + } + + if (ov_open(fp, &vf, NULL, 0) < 0) { + fclose(fp); + return NULL; + } ret = oggCommentsParse(ov_comment(&vf, -1)->user_comments); -- cgit v1.2.3