From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Fri, 10 Dec 2021 09:15:30 +0000 (+0000) Subject: Only include code to modify the RTSP buffer length if metadata support is included... X-Git-Tag: 4.1-rc1~24^2~354 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7a02083607fff77af5bc33e710c4eb359592cdb;p=thirdparty%2Fshairport-sync.git Only include code to modify the RTSP buffer length if metadata support is included in the configuration. --- diff --git a/rtsp.c b/rtsp.c index 54f3b73a..3e5915b9 100644 --- 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) {