File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ class MultiDecoder : public AudioDecoder {
65
65
// find the corresponding decoder
66
66
for (int j = 0 ; j < decoders.size (); j++) {
67
67
DecoderInfo info = decoders[j];
68
- if (StrView (info.mime ).equalsIgnoreCase (mime)) {
69
- LOGI (" New decoder found for %s" , info.mime );
68
+ if (StrView (info.mime ).equals (mime)) {
69
+ LOGI (" New decoder found for %s (%s) " , info.mime , mime);
70
70
actual_decoder = info;
71
71
// define output if it has not been defined
72
72
if (p_print!=nullptr
Original file line number Diff line number Diff line change @@ -64,15 +64,18 @@ class MimeDetector {
64
64
const uint8_t * start = (const uint8_t *)data;
65
65
if (start[0 ] == 0xFF && start[1 ] == 0xF1 ) {
66
66
mime = " audio/aac" ;
67
- } else if (memcmp (start, " ID3" , 3 ) || start[0 ] == 0xFF ||
68
- start[0 ] == 0xFE ) {
69
- mime = " audio/mpeg" ;
70
- } else if (memcmp (start, " RIFF" , 4 )) {
67
+ } else if (memcmp (start, " RIFF" , 4 )==0 ) {
71
68
mime = " audio/vnd.wave" ;
72
- } else if (memcmp (start, " OggS" , 4 )) {
69
+ } else if (memcmp (start, " OggS" , 4 )== 0 ) {
73
70
mime = " audio/ogg" ;
71
+ } else if (memcmp (start, " ID3" , 3 )==0 || start[0 ] == 0xFF ||
72
+ start[0 ] == 0xFE ) {
73
+ mime = " audio/mpeg" ;
74
74
}
75
75
}
76
+ if (mime != nullptr ) {
77
+ LOGI (" Determined mime: %s" , mime);
78
+ }
76
79
return mime;
77
80
}
78
81
};
You can’t perform that action at this time.
0 commit comments