Skip to content

Commit

Permalink
vcap/rtsp: set cURL verbose according to log_level
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
MartinPulec committed Jul 18, 2024
1 parent f3d6724 commit 4bf2808
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/video_capture/rtsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4bf2808

Please sign in to comment.