Commit 8749e7d4 authored by mstorsjo's avatar mstorsjo

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.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23546 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 35b5c4d8
......@@ -480,6 +480,12 @@ static int64_t http_seek(URLContext *h, int64_t off, int whence)
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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment