# HG changeset patch # User nenolod # Date 1163904983 28800 # Node ID 7e1d5cc9ef1bb49f30352728e4f270473d259df9 # Parent f653f1219db26a4c456ebd98acfdfad7fc4b3c63 [svn] - fix wavpack plugin diff -r f653f1219db2 -r 7e1d5cc9ef1b ChangeLog --- a/ChangeLog Sat Nov 18 16:29:50 2006 -0800 +++ b/ChangeLog Sat Nov 18 18:56:23 2006 -0800 @@ -1,3 +1,10 @@ +2006-11-19 00:29:50 +0000 Tony Vroon + revision [548] + So input.c wants to have the old-style function available... + trunk/src/aac/src/libmp4.c | 36 +++++++++++++++++++++++++++++++++++- + 1 file changed, 35 insertions(+), 1 deletion(-) + + 2006-11-19 00:26:08 +0000 Tony Vroon revision [546] So input.c wants to have the old-style function available... diff -r f653f1219db2 -r 7e1d5cc9ef1b src/wavpack/libwavpack.cxx --- a/src/wavpack/libwavpack.cxx Sat Nov 18 16:29:50 2006 -0800 +++ b/src/wavpack/libwavpack.cxx Sat Nov 18 18:56:23 2006 -0800 @@ -31,6 +31,7 @@ extern "C" InputPlugin * get_iplugin_info(void); static void wv_load_config(); +static int wv_is_our_file(gchar *filename); static int wv_is_our_fd(gchar *filename, VFSFile *file); static void wv_play(char *); static void wv_stop(void); @@ -63,7 +64,7 @@ wv_load_config, wv_about_box, wv_configure, - NULL, //old style is_our_file + wv_is_our_file, //old style is_our_file NULL, //no use wv_play, wv_stop, @@ -79,7 +80,7 @@ NULL, NULL, wv_get_song_info, - wv_file_info_box, //info box + wv_file_info_box, //info box NULL, //output wv_get_song_tuple, NULL, @@ -262,6 +263,23 @@ return FALSE; } +static int +wv_is_our_file(gchar *filename) +{ + VFSFile *file = vfs_fopen(filename, "rb"); + gchar magic[4]; + + if (!file) + return FALSE; + + vfs_fread(magic,1,4,file); + + if (!memcmp(magic,"wvpk",4)) + return TRUE; + + return FALSE; +} + void load_tag(ape_tag *tag, WavpackContext *ctx) {