Commit 897779fa authored by mstorsjo's avatar mstorsjo

Simplify ff_rtsp_send_cmd_with_content_async, remove an unnecessary buffer


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22680 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 479c1102
...@@ -1006,18 +1006,16 @@ void ff_rtsp_send_cmd_with_content_async(AVFormatContext *s, ...@@ -1006,18 +1006,16 @@ void ff_rtsp_send_cmd_with_content_async(AVFormatContext *s,
int send_content_length) int send_content_length)
{ {
RTSPState *rt = s->priv_data; RTSPState *rt = s->priv_data;
char buf[4096], buf1[1024]; char buf[4096];
rt->seq++; rt->seq++;
snprintf(buf, sizeof(buf), "%s %s RTSP/1.0\r\n", method, url); snprintf(buf, sizeof(buf), "%s %s RTSP/1.0\r\n", method, url);
if (headers) if (headers)
av_strlcat(buf, headers, sizeof(buf)); av_strlcat(buf, headers, sizeof(buf));
snprintf(buf1, sizeof(buf1), "CSeq: %d\r\n", rt->seq); av_strlcatf(buf, sizeof(buf), "CSeq: %d\r\n", rt->seq);
av_strlcat(buf, buf1, sizeof(buf));
if (rt->session_id[0] != '\0' && (!headers || if (rt->session_id[0] != '\0' && (!headers ||
!strstr(headers, "\nIf-Match:"))) { !strstr(headers, "\nIf-Match:"))) {
snprintf(buf1, sizeof(buf1), "Session: %s\r\n", rt->session_id); av_strlcatf(buf, sizeof(buf), "Session: %s\r\n", rt->session_id);
av_strlcat(buf, buf1, sizeof(buf));
} }
if (rt->auth[0]) { if (rt->auth[0]) {
char *str = ff_http_auth_create_response(&rt->auth_state, char *str = ff_http_auth_create_response(&rt->auth_state,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment