[FFmpeg-cvslog] r23528 - trunk/libavformat/http.c
mstorsjo
subversion
Tue Jun 8 13:06:36 CEST 2010
Author: mstorsjo
Date: Tue Jun 8 13:06:36 2010
New Revision: 23528
Log:
Fix bugs in the http custom header handling
Initialize the buffer av_strlcatf writes into.
Add the dash at the end of the Range header.
10l to me for not spotting it earlier
Modified:
trunk/libavformat/http.c
Modified: trunk/libavformat/http.c
==============================================================================
--- trunk/libavformat/http.c Tue Jun 8 12:44:27 2010 (r23527)
+++ trunk/libavformat/http.c Tue Jun 8 13:06:36 2010 (r23528)
@@ -270,7 +270,7 @@ static int http_connect(URLContext *h, c
HTTPContext *s = h->priv_data;
int post, err;
char line[1024];
- char headers[1024];
+ char headers[1024] = "";
char *authstr = NULL;
int64_t off = s->off;
int len = 0;
@@ -290,7 +290,7 @@ static int http_connect(URLContext *h, c
sizeof(headers) - len);
if (!has_header(s->headers, "\r\nRange: "))
len += av_strlcatf(headers + len, sizeof(headers) - len,
- "Range: bytes=%"PRId64"\r\n", s->off);
+ "Range: bytes=%"PRId64"-\r\n", s->off);
if (!has_header(s->headers, "\r\nConnection: "))
len += av_strlcpy(headers + len, "Connection: close\r\n",
sizeof(headers)-len);
More information about the ffmpeg-cvslog
mailing list