From d5b3dd36fdc1f2924398f8c8b948f1b5cd9068a0 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Tue, 28 Apr 2009 09:29:11 +0200
Subject: mp4ff_decoder: use g_ascii_strcasecmp() instead of strcasecmp()

strcasecmp() is locale dependent, making it a bad choice for internal
string comparisons.
---
 src/decoder/mp4ff_plugin.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

(limited to 'src/decoder')

diff --git a/src/decoder/mp4ff_plugin.c b/src/decoder/mp4ff_plugin.c
index 17eb7acdb..cf9382904 100644
--- a/src/decoder/mp4ff_plugin.c
+++ b/src/decoder/mp4ff_plugin.c
@@ -394,21 +394,22 @@ mp4_tag_dup(const char *file)
 
 		mp4ff_meta_get_by_index(mp4fh, i, &item, &value);
 
-		if (0 == strcasecmp("artist", item)) {
+		if (0 == g_ascii_strcasecmp("artist", item)) {
 			tag_add_item(ret, TAG_ITEM_ARTIST, value);
-		} else if (0 == strcasecmp("title", item)) {
+		} else if (0 == g_ascii_strcasecmp("title", item)) {
 			tag_add_item(ret, TAG_ITEM_TITLE, value);
-		} else if (0 == strcasecmp("album", item)) {
+		} else if (0 == g_ascii_strcasecmp("album", item)) {
 			tag_add_item(ret, TAG_ITEM_ALBUM, value);
-		} else if (0 == strcasecmp("track", item)) {
+		} else if (0 == g_ascii_strcasecmp("track", item)) {
 			tag_add_item(ret, TAG_ITEM_TRACK, value);
-		} else if (0 == strcasecmp("disc", item)) {	/* Is that the correct id? */
+		} else if (0 == g_ascii_strcasecmp("disc", item)) {
+			/* Is that the correct id? */
 			tag_add_item(ret, TAG_ITEM_DISC, value);
-		} else if (0 == strcasecmp("genre", item)) {
+		} else if (0 == g_ascii_strcasecmp("genre", item)) {
 			tag_add_item(ret, TAG_ITEM_GENRE, value);
-		} else if (0 == strcasecmp("date", item)) {
+		} else if (0 == g_ascii_strcasecmp("date", item)) {
 			tag_add_item(ret, TAG_ITEM_DATE, value);
-		} else if (0 == strcasecmp("writer", item)) {
+		} else if (0 == g_ascii_strcasecmp("writer", item)) {
 			tag_add_item(ret, TAG_ITEM_COMPOSER, value);
 		}
 
-- 
cgit v1.2.3