diff --git a/src/flac/utils.c b/src/flac/utils.c
index 2fab29e..444c98e 100644
--- a/src/flac/utils.c
+++ b/src/flac/utils.c
@@ -409,7 +409,7 @@ FLAC__bool flac__utils_get_channel_mask_tag(const FLAC__StreamMetadata *object,
 		return false;
 	if(0 == (p = strchr((const char *)object->data.vorbis_comment.comments[offset].entry, '='))) /* should never happen, but just in case */
 		return false;
-	if(strncmp(p, "=0x", 3))
+	if(FLAC__STRNCASECMP(p, "=0x", 3))
 		return false;
 	if(sscanf(p+3, "%x", &val) != 1)
 		return false;
diff --git a/src/metaflac/options.c b/src/metaflac/options.c
index 16713d2..db60d4e 100644
--- a/src/metaflac/options.c
+++ b/src/metaflac/options.c
@@ -1023,7 +1023,7 @@ FLAC__bool parse_block_type(const char *in, Argument_BlockType *out)
 				if(strlen(r) == sizeof (out->entries[entry].application_id)) {
 					memcpy(out->entries[entry].application_id, r, sizeof (out->entries[entry].application_id));
 				}
-				else if(strlen(r) == 10 && strncmp(r, "0x", 2) == 0 && strspn(r+2, "0123456789ABCDEFabcdef") == 8) {
+				else if(strlen(r) == 10 && FLAC__STRNCASECMP(r, "0x", 2) == 0 && strspn(r+2, "0123456789ABCDEFabcdef") == 8) {
 					FLAC__uint32 x = strtoul(r+2, 0, 16);
 					out->entries[entry].application_id[3] = (FLAC__byte)(x & 0xff);
 					out->entries[entry].application_id[2] = (FLAC__byte)((x>>=8) & 0xff);
