1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-07-16 22:42:38 +02:00

http: K&R formatting cosmetics

This commit is contained in:
Luca Barbato
2014-03-10 18:02:09 +01:00
parent 78b21c1d71
commit 7a2fddb448

View File

@ -327,12 +327,11 @@ static int process_line(URLContext *h, char *line, int line_count,
/* error codes are 4xx and 5xx, but regard 401 as a success, so we /* error codes are 4xx and 5xx, but regard 401 as a success, so we
* don't abort until all headers have been parsed. */ * don't abort until all headers have been parsed. */
if (s->http_code >= 400 && s->http_code < 600 && (s->http_code != 401 if (s->http_code >= 400 && s->http_code < 600 &&
|| s->auth_state.auth_type != HTTP_AUTH_NONE) && (s->http_code != 401 || s->auth_state.auth_type != HTTP_AUTH_NONE) &&
(s->http_code != 407 || s->proxy_auth_state.auth_type != HTTP_AUTH_NONE)) { (s->http_code != 407 || s->proxy_auth_state.auth_type != HTTP_AUTH_NONE)) {
end += strspn(end, SPACE_CHARS); end += strspn(end, SPACE_CHARS);
av_log(h, AV_LOG_WARNING, "HTTP error %d %s\n", av_log(h, AV_LOG_WARNING, "HTTP error %d %s\n", s->http_code, end);
s->http_code, end);
return AVERROR(EIO); return AVERROR(EIO);
} }
} else { } else {
@ -368,9 +367,11 @@ static int process_line(URLContext *h, char *line, int line_count,
s->filesize = strtoll(slash+1, NULL, 10); s->filesize = strtoll(slash+1, NULL, 10);
} }
h->is_streamed = 0; /* we _can_ in fact seek */ h->is_streamed = 0; /* we _can_ in fact seek */
} else if (!av_strcasecmp(tag, "Accept-Ranges") && !strncmp(p, "bytes", 5)) { } else if (!av_strcasecmp(tag, "Accept-Ranges") &&
!strncmp(p, "bytes", 5)) {
h->is_streamed = 0; h->is_streamed = 0;
} else if (!av_strcasecmp (tag, "Transfer-Encoding") && !av_strncasecmp(p, "chunked", 7)) { } else if (!av_strcasecmp(tag, "Transfer-Encoding") &&
!av_strncasecmp(p, "chunked", 7)) {
s->filesize = -1; s->filesize = -1;
s->chunksize = 0; s->chunksize = 0;
} else if (!av_strcasecmp(tag, "WWW-Authenticate")) { } else if (!av_strcasecmp(tag, "WWW-Authenticate")) {
@ -383,7 +384,8 @@ static int process_line(URLContext *h, char *line, int line_count,
if (!strcmp(p, "close")) if (!strcmp(p, "close"))
s->willclose = 1; s->willclose = 1;
} else if (!av_strcasecmp(tag, "Content-Encoding")) { } else if (!av_strcasecmp(tag, "Content-Encoding")) {
if (!av_strncasecmp(p, "gzip", 4) || !av_strncasecmp(p, "deflate", 7)) { if (!av_strncasecmp(p, "gzip", 4) ||
!av_strncasecmp(p, "deflate", 7)) {
#if CONFIG_ZLIB #if CONFIG_ZLIB
s->compressed = 1; s->compressed = 1;
inflateEnd(&s->inflate_stream); inflateEnd(&s->inflate_stream);