[FFmpeg-cvslog] r23546 - trunk/libavformat/http.c

mstorsjo subversion
Wed Jun 9 10:29:51 CEST 2010


Author: mstorsjo
Date: Wed Jun  9 10:29:51 2010
New Revision: 23546

Log:
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.

Modified:
   trunk/libavformat/http.c

Modified: trunk/libavformat/http.c
==============================================================================
--- trunk/libavformat/http.c	Wed Jun  9 08:47:01 2010	(r23545)
+++ trunk/libavformat/http.c	Wed Jun  9 10:29:51 2010	(r23546)
@@ -480,6 +480,12 @@ static int64_t http_seek(URLContext *h, 
     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)



More information about the ffmpeg-cvslog mailing list