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).
This commit is contained in:
Martin Pulec
2024-07-18 16:22:57 +02:00
parent f3d67249b7
commit 4bf28085bf

View File

@@ -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);