From c434379d7977dfe4c10f964949beedc2d7ccce47 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 28 Apr 2009 09:29:39 +0200 Subject: mad_decoder: use g_ascii_strcasecmp() instead of strcasecmp() strcasecmp() is locale dependent, making it a bad choice for internal string comparisons. --- src/decoder/mad_plugin.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/decoder') diff --git a/src/decoder/mad_plugin.c b/src/decoder/mad_plugin.c index 2400f27d0..c6b9d32d3 100644 --- a/src/decoder/mad_plugin.c +++ b/src/decoder/mad_plugin.c @@ -320,16 +320,16 @@ parse_id3_replay_gain_info(struct id3_tag *tag) id3_ucs4_latin1duplicate(id3_field_getstring (&frame->fields[2])); - if (strcasecmp(key, "replaygain_track_gain") == 0) { + if (g_ascii_strcasecmp(key, "replaygain_track_gain") == 0) { replay_gain_info->tuples[REPLAY_GAIN_TRACK].gain = atof(value); found = true; - } else if (strcasecmp(key, "replaygain_album_gain") == 0) { + } else if (g_ascii_strcasecmp(key, "replaygain_album_gain") == 0) { replay_gain_info->tuples[REPLAY_GAIN_ALBUM].gain = atof(value); found = true; - } else if (strcasecmp(key, "replaygain_track_peak") == 0) { + } else if (g_ascii_strcasecmp(key, "replaygain_track_peak") == 0) { replay_gain_info->tuples[REPLAY_GAIN_TRACK].peak = atof(value); found = true; - } else if (strcasecmp(key, "replaygain_album_peak") == 0) { + } else if (g_ascii_strcasecmp(key, "replaygain_album_peak") == 0) { replay_gain_info->tuples[REPLAY_GAIN_ALBUM].peak = atof(value); found = true; } -- cgit v1.2.3