MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / parse_content_range

Function parse_content_range

libavformat/http.c:916–931  ·  view source on GitHub ↗

"bytes $from-$to/$document_size" */

Source from the content-addressed store, hash-verified

914
915/* "bytes $from-$to/$document_size" */
916static void parse_content_range(URLContext *h, const char *p)
917{
918 HTTPContext *s = h->priv_data;
919 const char *slash, *end;
920
921 if (!strncmp(p, "bytes ", 6)) {
922 p += 6;
923 s->off = strtoull(p, NULL, 10);
924 if ((end = strchr(p, '-')) && strlen(end) > 0)
925 s->range_end = strtoull(end + 1, NULL, 10) + 1;
926 if ((slash = strchr(p, '/')) && strlen(slash) > 0)
927 s->filesize_from_content_range = strtoull(slash + 1, NULL, 10);
928 }
929 if (s->seekable == -1 && (!s->is_akamai || s->filesize != 2147483647))
930 h->is_streamed = 0; /* we _can_ in fact seek */
931}
932
933static int parse_content_encoding(URLContext *h, const char *p)
934{

Callers 1

process_lineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected