diff options
author | Martin Storsjö <martin@martin.st> | 2010-03-25 22:04:41 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-03-25 22:04:41 +0000 |
commit | 7b4a36450b10add40b0fc698e6eec89c4534dc86 (patch) | |
tree | 9a1cc271c85e4c4b91159b221a2c3a8d8e5db7f5 /libavformat/rtsp.c | |
parent | 60f198a77497f54fb12c2e048d64ce026c467812 (diff) | |
download | ffmpeg-7b4a36450b10add40b0fc698e6eec89c4534dc86.tar.gz |
Simplify ff_rtsp_send_cmd_with_content_async, remove an unnecessary buffer
Originally committed as revision 22680 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index fd6112e9b0..a7ab0fd240 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1006,18 +1006,16 @@ void ff_rtsp_send_cmd_with_content_async(AVFormatContext *s, int send_content_length) { RTSPState *rt = s->priv_data; - char buf[4096], buf1[1024]; + char buf[4096]; rt->seq++; snprintf(buf, sizeof(buf), "%s %s RTSP/1.0\r\n", method, url); if (headers) av_strlcat(buf, headers, sizeof(buf)); - snprintf(buf1, sizeof(buf1), "CSeq: %d\r\n", rt->seq); - av_strlcat(buf, buf1, sizeof(buf)); + av_strlcatf(buf, sizeof(buf), "CSeq: %d\r\n", rt->seq); if (rt->session_id[0] != '\0' && (!headers || !strstr(headers, "\nIf-Match:"))) { - snprintf(buf1, sizeof(buf1), "Session: %s\r\n", rt->session_id); - av_strlcat(buf, buf1, sizeof(buf)); + av_strlcatf(buf, sizeof(buf), "Session: %s\r\n", rt->session_id); } if (rt->auth[0]) { char *str = ff_http_auth_create_response(&rt->auth_state, |