aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-20 23:09:51 +0200
committerMax Kellermann <max@duempel.org>2013-10-20 23:09:51 +0200
commit0e4d2e7277bc2adf18dd1e719ec4ce684f86d72b (patch)
tree181aa272821ace382565b3c3465949101b98e253 /src/decoder
parent2bbff77e489ae72a332b18b122844bd761d75764 (diff)
downloadmpd-0e4d2e7277bc2adf18dd1e719ec4ce684f86d72b.tar.gz
mpd-0e4d2e7277bc2adf18dd1e719ec4ce684f86d72b.tar.xz
mpd-0e4d2e7277bc2adf18dd1e719ec4ce684f86d72b.zip
Util/ASCII: add function StringEqualsCaseASCII()
Replaces GLib's g_ascii_strcasecmp().
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/MadDecoderPlugin.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/decoder/MadDecoderPlugin.cxx b/src/decoder/MadDecoderPlugin.cxx
index a6c53bfb6..260ee1900 100644
--- a/src/decoder/MadDecoderPlugin.cxx
+++ b/src/decoder/MadDecoderPlugin.cxx
@@ -26,6 +26,7 @@
#include "tag/TagRva2.hxx"
#include "tag/TagHandler.hxx"
#include "CheckAudioFormat.hxx"
+#include "util/ASCII.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "Log.hxx"
@@ -272,16 +273,16 @@ parse_id3_replay_gain_info(struct replay_gain_info *replay_gain_info,
id3_ucs4_latin1duplicate(id3_field_getstring
(&frame->fields[2]));
- if (g_ascii_strcasecmp(key, "replaygain_track_gain") == 0) {
+ if (StringEqualsCaseASCII(key, "replaygain_track_gain")) {
replay_gain_info->tuples[REPLAY_GAIN_TRACK].gain = atof(value);
found = true;
- } else if (g_ascii_strcasecmp(key, "replaygain_album_gain") == 0) {
+ } else if (StringEqualsCaseASCII(key, "replaygain_album_gain")) {
replay_gain_info->tuples[REPLAY_GAIN_ALBUM].gain = atof(value);
found = true;
- } else if (g_ascii_strcasecmp(key, "replaygain_track_peak") == 0) {
+ } else if (StringEqualsCaseASCII(key, "replaygain_track_peak")) {
replay_gain_info->tuples[REPLAY_GAIN_TRACK].peak = atof(value);
found = true;
- } else if (g_ascii_strcasecmp(key, "replaygain_album_peak") == 0) {
+ } else if (StringEqualsCaseASCII(key, "replaygain_album_peak")) {
replay_gain_info->tuples[REPLAY_GAIN_ALBUM].peak = atof(value);
found = true;
}
@@ -321,10 +322,10 @@ parse_id3_mixramp(char **mixramp_start, char **mixramp_end,
id3_ucs4_latin1duplicate(id3_field_getstring
(&frame->fields[2]));
- if (g_ascii_strcasecmp(key, "mixramp_start") == 0) {
+ if (StringEqualsCaseASCII(key, "mixramp_start")) {
*mixramp_start = g_strdup(value);
found = true;
- } else if (g_ascii_strcasecmp(key, "mixramp_end") == 0) {
+ } else if (StringEqualsCaseASCII(key, "mixramp_end")) {
*mixramp_end = g_strdup(value);
found = true;
}