Skip to content

Commit e277a15

Browse files
committed
not supported codec ALAC
1 parent 509416f commit e277a15

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

src/Audio.cpp

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2715,6 +2715,36 @@ int Audio::read_M4A_Header(uint8_t* data, size_t len) {
27152715
return 0;
27162716
}
27172717

2718+
if (atom_name.equals("alac")) {
2719+
AUDIO_LOG_ERROR("Apple loseless audio codec (ALAC) not supported");
2720+
stopSong();
2721+
return 0;
2722+
}
2723+
2724+
if (atom_name.equals("ac-3")) {
2725+
AUDIO_LOG_ERROR("Dolby Digital not supported");
2726+
stopSong();
2727+
return 0;
2728+
}
2729+
2730+
if (atom_name.equals("ec-3")) {
2731+
AUDIO_LOG_ERROR("Dolby Digital Plud not supported");
2732+
stopSong();
2733+
return 0;
2734+
}
2735+
2736+
if (atom_name.equals("Opus")) {
2737+
// todo
2738+
stopSong();
2739+
return 0;
2740+
}
2741+
2742+
if (atom_name.equals("mp3 ")) {
2743+
// todo
2744+
stopSong();
2745+
return 0;
2746+
}
2747+
27182748
if (atom_struct) { AUDIO_LOG_WARN("atom %s @ %i, size: %i, ends @ %i", atom_name.c_get(), m_m4aHdr.headerSize, atom_size.to_uint32(16), m_m4aHdr.headerSize + atom_size.to_uint32(16)); }
27192749
m_m4aHdr.retvalue += atom_size.to_uint32(16);
27202750
m_m4aHdr.headerSize += atom_size.to_uint32(16);
@@ -2967,7 +2997,6 @@ int Audio::read_M4A_Header(uint8_t* data, size_t len) {
29672997
id3tag.reset();
29682998
if (dty == 0 && strlen(&sa[24]) > 0) {
29692999
if(strcmp(san, "covr") == 0){
2970-
sa.hex_dump(90);
29713000
m_m4aHdr.picLen = as - 24;
29723001
m_m4aHdr.picPos = pos + 24 - as;
29733002
AUDIO_LOG_DEBUG("cover jpeg start: %lu, len %lu", m_m4aHdr.picPos, m_m4aHdr.picLen);

src/mp3_decoder/mp3_decoder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,8 +1145,8 @@ int32_t MP3Decoder::decode(uint8_t* inbuf, int32_t* bytesLeft, int16_t* outbuf)
11451145

11461146
if (m_MP3DecInfo->nSlots > *bytesLeft) {
11471147
MP3ClearBadFrame(outbuf);
1148-
MP3_LOG_ERROR("MP3, indata underflow");
1149-
return MP3_ERR;
1148+
MP3_LOG_DEBUG("MP3, indata underflow");
1149+
return MP3_NONE;
11501150
}
11511151

11521152
/* fill main data buffer with enough new data for this frame */

0 commit comments

Comments
 (0)