Skip to content

Commit 4bf2808

Browse files
committed
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).
1 parent f3d6724 commit 4bf2808

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/video_capture/rtsp.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,8 @@ init_rtsp(struct rtsp_state *s) {
778778

779779
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.
780780
//my_curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, 1);
781-
my_curl_easy_setopt(s->curl, CURLOPT_VERBOSE, 0L, goto error);
781+
my_curl_easy_setopt(s->curl, CURLOPT_VERBOSE,
782+
log_level >= LOG_LEVEL_DEBUG ? 1L : 0L, goto error);
782783
my_curl_easy_setopt(s->curl, CURLOPT_NOPROGRESS, 1L, goto error);
783784
my_curl_easy_setopt(s->curl, CURLOPT_HEADERDATA, &s, goto error);
784785
my_curl_easy_setopt(s->curl, CURLOPT_HEADERFUNCTION, print_rtsp_header, goto error);

0 commit comments

Comments
 (0)