# HG changeset patch # User mstorsjo # Date 1276072191 0 # Node ID 4c91cdcb8a52aef6fe26ca90614a7c20b3f5639f # Parent 10c9d304794f50ff96c5c29933ab6f9ad22f653d Initialize the http connection in http_seek, too This makes url_fsize return correct values for delay opened connections that have not yet been initialized. This fixes using the image2 demuxer with http sources. diff -r 10c9d304794f -r 4c91cdcb8a52 http.c --- a/http.c Tue Jun 08 19:31:08 2010 +0000 +++ b/http.c Wed Jun 09 08:29:51 2010 +0000 @@ -480,6 +480,12 @@ uint8_t old_buf[BUFFER_SIZE]; int old_buf_size; + if (!s->init) { + int ret = http_open_cnx(h); + if (ret != 0) + return ret; + } + if (whence == AVSEEK_SIZE) return s->filesize; else if ((s->filesize == -1 && whence == SEEK_END) || h->is_streamed)