Commit ef80464c authored by Max Kellermann's avatar Max Kellermann

ogg: revert "use ogg_fopen() instead of ogg_open()"

Unfortunately, ov_fopen() is not supported by libvorbis versions older than 1.2.
parent b67a8e4d
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment