From 2dc245ff2ecd9a0d89577afb82d6698624ebfd7c Mon Sep 17 00:00:00 2001 From: Pierre-Loup M Date: Mon, 16 Nov 2020 19:02:57 +0100 Subject: [PATCH] Fix tags framesize endless loop, add add'l tag support (#336) * Modified AudioFileSourceFS.h to add resolution operator on items defined into the fs namespace in esp32 libraries. * Added track, set, popularimeter, compilation tags. Changed framesize loop with 32bit counter to avoid endless loops for large frames (like APIC). Co-authored-by: Pierre-Loup Martin --- src/AudioFileSourceID3.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/AudioFileSourceID3.cpp b/src/AudioFileSourceID3.cpp index 1723b8d..7e79e6e 100644 --- a/src/AudioFileSourceID3.cpp +++ b/src/AudioFileSourceID3.cpp @@ -143,6 +143,7 @@ uint32_t AudioFileSourceID3::read(void *data, uint32_t len) if (ret<10) return ret; if ((buff[0]!='I') || (buff[1]!='D') || (buff[2]!='3') || (buff[3]>0x04) || (buff[3]<0x02) || (buff[4]!=0)) { + cb.md("eof", false, "id3"); return 10 + src->read(buff+10, len-10); } @@ -212,7 +213,7 @@ uint32_t AudioFileSourceID3::read(void *data, uint32_t len) // Read the value and send to callback char value[64]; - uint16_t i; + uint32_t i; bool isUnicode = (id3.getByte()==1) ? true : false; for (i=0; iread(data, len); }