# HG changeset patch # User chainsaw # Date 1142201258 28800 # Node ID 7b903bd39180b62bf15ac8a97466f73de0858007 # Parent dfce5683ef459ed487c5e65aa2245d4387651f39 [svn] Ask the decoder whether this is a FLAC file, instead of depending on file magic. diff -r dfce5683ef45 -r 7b903bd39180 Plugins/Input/flac/plugin.c --- 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; }