aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/oggvorbis_plugin.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/decoder/oggvorbis_plugin.c b/src/decoder/oggvorbis_plugin.c
index 5aa777065..9fe381d25 100644
--- a/src/decoder/oggvorbis_plugin.c
+++ b/src/decoder/oggvorbis_plugin.c
@@ -327,17 +327,15 @@ 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;
- fp = fopen(file, "r");
- if (!fp) {
- return NULL;
- }
-
- if (ov_open(fp, &vf, NULL, 0) < 0) {
- fclose(fp);
+ duplicated = g_strdup(file);
+ err = ov_fopen(duplicated, &vf);
+ g_free(duplicated);
+ if (err < 0)
return NULL;
}