From a8846e30036c4d20897a61c501c842f23febe24d Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Sat, 20 Mar 2021 19:13:08 +0100 Subject: [PATCH] Increase id3v2 max item size on high mem targets As per multiple user requests: https://forums.rockbox.org/index.php/topic,53319.msg The acceptable size for id3v2 fields currently maxes out at 240 bytes on targets with more than 2MB of memory. The comments field, especially for Podcasts, can sometimes contain significantly more characters than Rockbox allows. The limit for devices with more than 8MB of memory is increased to 500 bytes for individual fields, and to 1800 bytes for the buffer containing all fields. Change-Id: I4593372229158756f102f67bcc4a43e64f632d58 --- lib/rbcodec/metadata/metadata.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/rbcodec/metadata/metadata.h b/lib/rbcodec/metadata/metadata.h index 768e62d3b0..50fd5bac86 100644 --- a/lib/rbcodec/metadata/metadata.h +++ b/lib/rbcodec/metadata/metadata.h @@ -176,7 +176,10 @@ struct afmt_entry /* database of labels and codecs. add formats per above enum */ extern const struct afmt_entry audio_formats[AFMT_NUM_CODECS]; -#if MEMORYSIZE > 2 +#if MEMORYSIZE > 8 +#define ID3V2_BUF_SIZE 1800 +#define ID3V2_MAX_ITEM_SIZE 500 +#elif MEMORYSIZE > 2 #define ID3V2_BUF_SIZE 900 #define ID3V2_MAX_ITEM_SIZE 240 #else