changeset 825:7b903bd39180 trunk

[svn] Ask the decoder whether this is a FLAC file, instead of depending on file magic.
author chainsaw
date Sun, 12 Mar 2006 14:07:38 -0800
parents dfce5683ef45
children e143cbba4819
files Plugins/Input/flac/plugin.c
diffstat 1 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Input/flac/plugin.c	Sun Mar 12 12:09:33 2006 -0800
+++ b/Plugins/Input/flac/plugin.c	Sun Mar 12 14:07:38 2006 -0800
@@ -288,16 +288,8 @@
 
 int FLAC_XMMS__is_our_file(char *filename)
 {
-	VFSFile *file;
-	gchar magic[4];
-	if ((file = vfs_fopen(filename, "rb"))) {
-		vfs_fread(magic, 1, 4, file);
-		if (!strncmp(magic, "fLaC", 4)) {
-			vfs_fclose(file);
-			return 1;
-		}
-		vfs_fclose(file);
-	}
+	if (source_to_decoder_type (filename) == DECODER_FILE)
+		return 1;
 	return 0;
 }