From 4bf28085bfb3fb8fe9cbdf8820999484f024c94a Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Thu, 18 Jul 2024 16:22:57 +0200 Subject: [PATCH] vcap/rtsp: set cURL verbose according to log_level The value is just a boolean for cURL (0/1), so use VERBOSE=1 for >LOG_LEVEL_DEBUG (it is quite chatty so use DEBUG rather than LOG_LEVEL_VERBOSE). --- src/video_capture/rtsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video_capture/rtsp.c b/src/video_capture/rtsp.c index 4dd61dcff..05ed38f68 100644 --- a/src/video_capture/rtsp.c +++ b/src/video_capture/rtsp.c @@ -778,7 +778,8 @@ init_rtsp(struct rtsp_state *s) { my_curl_easy_setopt(s->curl, CURLOPT_NOSIGNAL, 1, goto error); //This tells curl not to use any functions that install signal handlers or cause signals to be sent to your process. //my_curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, 1); - my_curl_easy_setopt(s->curl, CURLOPT_VERBOSE, 0L, goto error); + my_curl_easy_setopt(s->curl, CURLOPT_VERBOSE, + log_level >= LOG_LEVEL_DEBUG ? 1L : 0L, goto error); my_curl_easy_setopt(s->curl, CURLOPT_NOPROGRESS, 1L, goto error); my_curl_easy_setopt(s->curl, CURLOPT_HEADERDATA, &s, goto error); my_curl_easy_setopt(s->curl, CURLOPT_HEADERFUNCTION, print_rtsp_header, goto error);