Skip to content

Commit 1fdbe17

Browse files
committed
MimeDetector: set a4a inactive by default
1 parent 56612c2 commit 1fdbe17

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/AudioTools/CoreAudio/AudioMetaData/MimeDetector.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class MimeDetector : public MimeSource {
7070
setCheck("audio/ogg", checkOGG);
7171
setCheck("video/MP2T", checkMP2T);
7272
setCheck("audio/prs.sid", checkSID);
73-
setCheck("audio/m4a", checkM4A);
73+
setCheck("audio/m4a", checkM4A, false);
7474
setCheck("audio/mpeg", checkMP3Ext);
7575
setCheck("audio/aac", checkAACExt);
7676
}
@@ -97,16 +97,18 @@ class MimeDetector : public MimeSource {
9797
}
9898

9999
/// adds/updates the checking logic for the indicated mime
100-
void setCheck(const char* mime, bool (*check)(uint8_t* start, size_t len)) {
100+
void setCheck(const char* mime, bool (*check)(uint8_t* start, size_t len), bool isActvie = true) {
101101
StrView mime_str{mime};
102102
for (int j = 0; j < checks.size(); j++) {
103103
Check l_check = checks[j];
104104
if (mime_str.equals(l_check.mime)) {
105105
l_check.check = check;
106+
l_check.is_active = isActvie;
106107
return;
107108
}
108109
}
109110
Check check_to_add{mime, check};
111+
check_to_add.is_active = isActvie;
110112
checks.push_back(check_to_add);
111113
}
112114

0 commit comments

Comments
 (0)