diff options
author | Max Kellermann <max@duempel.org> | 2008-11-11 16:19:29 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-11 16:19:29 +0100 |
commit | c883d761abbf0bfa491f28a340c2c535ec6e0268 (patch) | |
tree | 630fbe91a638c530b6a96044fe81dd27062f8e56 /src/decoder | |
parent | e2c07dbbbc1734a4f3f6ea9c4852e991eff96a89 (diff) | |
download | mpd-c883d761abbf0bfa491f28a340c2c535ec6e0268.tar.gz mpd-c883d761abbf0bfa491f28a340c2c535ec6e0268.tar.xz mpd-c883d761abbf0bfa491f28a340c2c535ec6e0268.zip |
wavpack: make the "key" argument to wavpack_tag() const
This allows us to remove the "static char[]" hack.
Diffstat (limited to '')
-rw-r--r-- | src/decoder/wavpack_plugin.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c index d76f46974..07d363495 100644 --- a/src/decoder/wavpack_plugin.c +++ b/src/decoder/wavpack_plugin.c @@ -214,7 +214,7 @@ wavpack_decode(struct decoder * decoder, WavpackContext *wpc, bool canseek, } static char * -wavpack_tag(WavpackContext *wpc, char *key) +wavpack_tag(WavpackContext *wpc, const char *key) { char *value = NULL; int size; @@ -232,38 +232,34 @@ wavpack_tag(WavpackContext *wpc, char *key) static struct replay_gain_info * wavpack_replaygain(WavpackContext *wpc) { - static char replaygain_track_gain[] = "replaygain_track_gain"; - static char replaygain_album_gain[] = "replaygain_album_gain"; - static char replaygain_track_peak[] = "replaygain_track_peak"; - static char replaygain_album_peak[] = "replaygain_album_peak"; struct replay_gain_info *replay_gain_info; bool found = false; char *value; replay_gain_info = replay_gain_info_new(); - value = wavpack_tag(wpc, replaygain_track_gain); + value = wavpack_tag(wpc, "replaygain_track_gain"); if (value) { replay_gain_info->track_gain = atof(value); free(value); found = true; } - value = wavpack_tag(wpc, replaygain_album_gain); + value = wavpack_tag(wpc, "replaygain_album_gain"); if (value) { replay_gain_info->album_gain = atof(value); free(value); found = true; } - value = wavpack_tag(wpc, replaygain_track_peak); + value = wavpack_tag(wpc, "replaygain_track_peak"); if (value) { replay_gain_info->track_peak = atof(value); free(value); found = true; } - value = wavpack_tag(wpc, replaygain_album_peak); + value = wavpack_tag(wpc, "replaygain_album_peak"); if (value) { replay_gain_info->album_peak = atof(value); free(value); |