From 90eb2ded1de1aa88bf5394001bdb6c69b6c4320f Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Wed, 31 May 2023 22:33:15 -0700 Subject: [PATCH] HTTP: Support much larger metadata blocks Support icy metaint data blocks up to 4KiB in size Signed-off-by: Christopher Snowhill --- Plugins/HTTPSource/HTTPSource.h | 2 +- Plugins/HTTPSource/HTTPSource.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/HTTPSource/HTTPSource.h b/Plugins/HTTPSource/HTTPSource.h index 2bf1934c8..2820524f5 100644 --- a/Plugins/HTTPSource/HTTPSource.h +++ b/Plugins/HTTPSource/HTTPSource.h @@ -15,7 +15,7 @@ #define BUFFER_SIZE 0x10000 #define BUFFER_MASK 0xffff -#define MAX_METADATA 1024 +#define MAX_METADATA 4096 #define TIMEOUT 10 // in seconds diff --git a/Plugins/HTTPSource/HTTPSource.m b/Plugins/HTTPSource/HTTPSource.m index 86131a75a..5bd24f12a 100644 --- a/Plugins/HTTPSource/HTTPSource.m +++ b/Plugins/HTTPSource/HTTPSource.m @@ -64,7 +64,7 @@ static int http_parse_shoutcast_meta(HTTPSource *fp, const char *meta, size_t si DLog(@"%s", meta); const char *e = meta + size; const char strtitle[] = "StreamTitle='"; - char title[256] = ""; + char title[4096] = ""; while(meta < e) { if(!memcmp(meta, strtitle, sizeof(strtitle) - 1)) { meta += sizeof(strtitle) - 1;