From b763852f575fa9395289e7fe3e26f9b133961c81 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@musicpd.org>
Date: Mon, 7 May 2018 10:53:48 +0200
Subject: [PATCH] decoder/dsd: allow 4 MB ID3 tags

Closes #277
---
 NEWS                           | 1 +
 src/decoder/plugins/DsdLib.cxx | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index d7c78c319..dfaea67cd 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ ver 0.20.20 (not yet released)
   - fix "modified-since" filter regression
 * decoder
   - dsdiff, dsf: support more MIME types
+  - dsdiff, dsf: allow 4 MB ID3 tags
 
 ver 0.20.19 (2018/04/26)
 * protocol
diff --git a/src/decoder/plugins/DsdLib.cxx b/src/decoder/plugins/DsdLib.cxx
index 000af531a..bad8ad641 100644
--- a/src/decoder/plugins/DsdLib.cxx
+++ b/src/decoder/plugins/DsdLib.cxx
@@ -128,7 +128,7 @@ dsdlib_tag_id3(InputStream &is,
 		return;
 
 	const auto count64 = size - tagoffset;
-	if (count64 < 10 || count64 > 1024 * 1024)
+	if (count64 < 10 || count64 > 4 * 1024 * 1024)
 		return;
 
 	if (!dsdlib_skip_to(nullptr, is, tagoffset))