| 121 | } |
| 122 | |
| 123 | static 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 | } |
| 146 | static int http_getc(HTTPContext *s) |
| 147 | { |
| 148 | int len; |
nothing calls this directly
no test coverage detected