changeset 6117:f221641c262a libavformat

Make sure the http protocol handler returns errors if a delayed open had failed
author mstorsjo
date Wed, 09 Jun 2010 09:19:36 +0000
parents 49eedb93140e
children 6780dc315f36
files http.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/http.c	Wed Jun 09 08:59:41 2010 +0000
+++ b/http.c	Wed Jun 09 09:19:36 2010 +0000
@@ -371,6 +371,8 @@
         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 @@
         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 @@
         if (ret != 0)
             return ret;
     }
+    if (!s->hd)
+        return AVERROR(EIO);
 
     if (whence == AVSEEK_SIZE)
         return s->filesize;