Mercurial > libavformat.hg
changeset 6115:4c91cdcb8a52 libavformat
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.
author | mstorsjo |
---|---|
date | Wed, 09 Jun 2010 08:29:51 +0000 |
parents | 10c9d304794f |
children | 49eedb93140e |
files | http.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)