Advertisement
Guest User

Untitled

a guest
Feb 5th, 2014
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.99 KB | None | 0 0
  1.     /* Add in RTSP headers */
  2.     out_buf = buf;
  3.     rt->seq++;
  4.     snprintf(buf, sizeof(buf), "%s %s RTSP/1.0\r\n", method, url);
  5.     if (headers)
  6.         av_strlcat(buf, headers, sizeof(buf));
  7.     av_strlcatf(buf, sizeof(buf), "CSeq: %d\r\n", rt->seq);
  8.     if (headers)
  9.     av_strlcat(buf, headers, sizeof(buf));
  10.     av_strlcatf(buf, sizeof(buf), "User-Agent: %s\r\n",  rt->user_agent);
  11.     if (rt->session_id[0] != '\0' && (!headers ||
  12.         !strstr(headers, "\nIf-Match:"))) {
  13.         av_strlcatf(buf, sizeof(buf), "Session: %s\r\n", rt->session_id);
  14.     }
  15.     if (rt->auth[0]) {
  16.         char *str = ff_http_auth_create_response(&rt->auth_state,
  17.                                                  rt->auth, url, method);
  18.         if (str)
  19.             av_strlcat(buf, str, sizeof(buf));
  20.         av_free(str);
  21.     }
  22.     if (send_content_length > 0 && send_content)
  23.         av_strlcatf(buf, sizeof(buf), "Content-Length: %d\r\n", send_content_length);
  24.     av_strlcat(buf, "\r\n", sizeof(buf));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement