Growing files will return 416 with a current file size in content-range. However, FFmpeg incorrectly assumes this is the final file size. Fix this by only setting file size for 206 responses. --- libavformat/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/http.c b/libavformat/http.c index 668cd51986..3bd89780c3 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -617,7 +617,7 @@ static void parse_content_range(URLContext *h, const char *p) HTTPContext *s = h->priv_data; const char *slash; - if (!strncmp(p, "bytes ", 6)) { + if (!strncmp(p, "bytes ", 6) && s->http_code == 206) { p += 6; s->off = strtoull(p, NULL, 10); if ((slash = strchr(p, '/')) && strlen(slash) > 0) -- 2.17.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel