ogg: revert "use ogg_fopen() instead of ogg_open()"
Unfortunately, ov_fopen() is not supported by libvorbis versions older than 1.2.
This commit is contained in:
		| @@ -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); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann