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

mstorsjo subversion
Wed Jun 9 11:19:36 CEST 2010


Author: mstorsjo
Date: Wed Jun  9 11:19:36 2010
New Revision: 23548

Log:
Make sure the http protocol handler returns errors if a delayed open had failed

Modified:
   trunk/libavformat/http.c

Modified: trunk/libavformat/http.c
==============================================================================
--- trunk/libavformat/http.c	Wed Jun  9 10:59:41 2010	(r23547)
+++ trunk/libavformat/http.c	Wed Jun  9 11:19:36 2010	(r23548)
@@ -371,6 +371,8 @@ static int http_read(URLContext *h, uint
         if (ret != 0)
             return ret;
     }
+    if (!s->hd)
+        return AVERROR(EIO);
 
     /* A size of zero can be used to force
      * initializaton of the connection. */
@@ -429,6 +431,8 @@ static int http_write(URLContext *h, con
         if (ret != 0)
             return ret;
     }
+    if (!s->hd)
+        return AVERROR(EIO);
 
     if (s->chunksize == -1) {
         /* headers are sent without any special encoding */
@@ -485,6 +489,8 @@ static int64_t http_seek(URLContext *h, 
         if (ret != 0)
             return ret;
     }
+    if (!s->hd)
+        return AVERROR(EIO);
 
     if (whence == AVSEEK_SIZE)
         return s->filesize;



More information about the ffmpeg-cvslog mailing list