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

Function http_open

libavformat/http.c:123–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123static int http_open(URLContext *h, const char *uri, int flags)
124{
125 HTTPContext *s;
126 int ret;
127
128 h->is_streamed = 1;
129
130 s = av_malloc(sizeof(HTTPContext));
131 if (!s) {
132 return AVERROR(ENOMEM);
133 }
134 h->priv_data = s;
135 s->filesize = -1;
136 s->chunksize = -1;
137 s->off = 0;
138 memset(&s->auth_state, 0, sizeof(s->auth_state));
139 av_strlcpy(s->location, uri, URL_SIZE);
140
141 ret = http_open_cnx(h);
142 if (ret != 0)
143 av_free (s);
144 return ret;
145}
146static int http_getc(HTTPContext *s)
147{
148 int len;

Callers

nothing calls this directly

Calls 4

av_mallocFunction · 0.85
av_strlcpyFunction · 0.85
http_open_cnxFunction · 0.85
av_freeFunction · 0.85

Tested by

no test coverage detected