http.c (libav-12) | : | http.c (libav-12.1) | ||
---|---|---|---|---|
skipping to change at line 787 | skipping to change at line 787 | |||
for (;;) { | for (;;) { | |||
do { | do { | |||
if ((err = http_get_line(s, line, sizeof(line))) < 0) | if ((err = http_get_line(s, line, sizeof(line))) < 0) | |||
return err; | return err; | |||
} while (!*line); /* skip CR LF from last chunk */ | } while (!*line); /* skip CR LF from last chunk */ | |||
s->chunksize = strtoll(line, NULL, 16); | s->chunksize = strtoll(line, NULL, 16); | |||
av_log(NULL, AV_LOG_TRACE, "Chunked encoding data size: %"PRId64 "'\n", | av_log(NULL, AV_LOG_TRACE, "Chunked encoding data size: %"PRId64 "'\n", | |||
s->chunksize); | s->chunksize); | |||
if (s->chunksize < 0) | ||||
if (!s->chunksize) | return AVERROR_INVALIDDATA; | |||
else if (!s->chunksize) | ||||
return 0; | return 0; | |||
break; | break; | |||
} | } | |||
} | } | |||
size = FFMIN(size, s->chunksize); | size = FFMIN(size, s->chunksize); | |||
} | } | |||
#if CONFIG_ZLIB | #if CONFIG_ZLIB | |||
if (s->compressed) | if (s->compressed) | |||
return http_buf_read_compressed(h, buf, size); | return http_buf_read_compressed(h, buf, size); | |||
#endif /* CONFIG_ZLIB */ | #endif /* CONFIG_ZLIB */ | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 3 lines changed or added |