]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Only include code to modify the RTSP buffer length if metadata support is included...
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Fri, 10 Dec 2021 09:15:30 +0000 (09:15 +0000)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Fri, 10 Dec 2021 09:15:30 +0000 (09:15 +0000)
rtsp.c

diff --git a/rtsp.c b/rtsp.c
index 54f3b73aaad87b2c0b247991438caadd9f000a3d..3e5915b9600f505f8a4ab7c569c2523e74445115 100644 (file)
--- a/rtsp.c
+++ b/rtsp.c
@@ -1174,8 +1174,10 @@ enum rtsp_read_request_response rtsp_read_request(rtsp_conn_info *conn, rtsp_mes
 
   enum rtsp_read_request_response reply = rtsp_read_request_response_ok;
   ssize_t buflen = 4096;
+#ifdef CONFIG_METADATA
   if ((config.metadata_enabled != 0) && (config.get_coverart != 0))
     buflen = 1024 * 256;  // big enough for typical picture data, which will be base64 encoded
+#endif
   int release_buffer = 0; // on exit, don't deallocate the buffer if everything was okay
   char *buf = malloc(buflen + 1); // add a NUL at the end
   if (!buf) {