aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-10-05 20:37:36 -0700
committerEric Wong <normalperson@yhbt.net>2008-10-05 20:37:36 -0700
commite0aca2dbf9ce1ed3db295f2c4345b231c11d6c64 (patch)
tree2d34dab19267df2750cef56044c2203e9479cb37
parent9c11f7dbdd3a0435bbc370f3b37bcc80960f74e7 (diff)
downloadmpd-e0aca2dbf9ce1ed3db295f2c4345b231c11d6c64.tar.gz
mpd-e0aca2dbf9ce1ed3db295f2c4345b231c11d6c64.tar.xz
mpd-e0aca2dbf9ce1ed3db295f2c4345b231c11d6c64.zip
wavpack: remove C99 initializers
More power to those who can't afford newer computers capable of installing/building/running newer toolchains.
-rw-r--r--src/inputPlugins/wavpack_plugin.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c
index b6da51e5e..b112ee168 100644
--- a/src/inputPlugins/wavpack_plugin.c
+++ b/src/inputPlugins/wavpack_plugin.c
@@ -382,17 +382,21 @@ static int can_seek(void *id)
return ((InputStreamPlus *)id)->is->seekable;
}
-/* FIXME: remove C99 initializers */
-static WavpackStreamReader mpd_is_reader = {
- .read_bytes = read_bytes,
- .get_pos = get_pos,
- .set_pos_abs = set_pos_abs,
- .set_pos_rel = set_pos_rel,
- .push_back_byte = push_back_byte,
- .get_length = get_length,
- .can_seek = can_seek,
- .write_bytes = NULL /* no need to write edited tags */
-};
+static WavpackStreamReader mpd_is_reader;
+
+static int wavpack_init(void)
+{
+ mpd_is_reader.read_bytes = read_bytes;
+ mpd_is_reader.get_pos = get_pos;
+ mpd_is_reader.set_pos_abs = set_pos_abs;
+ mpd_is_reader.set_pos_rel = set_pos_rel;
+ mpd_is_reader.push_back_byte = push_back_byte;
+ mpd_is_reader.get_length = get_length;
+ mpd_is_reader.can_seek = can_seek;
+ /* mpd_is_reader.write_bytes = NULL; no need to write edited tags */
+
+ return 0;
+}
static void
initInputStreamPlus(InputStreamPlus *isp, InputStream *is)
@@ -551,7 +555,7 @@ static char const *wavpackMimeTypes[] = { "audio/x-wavpack", NULL };
InputPlugin wavpackPlugin = {
"wavpack",
- NULL,
+ wavpack_init,
NULL,
wavpack_trydecode,
wavpack_streamdecode,