changeset 1881:a7abdfdb5ed7 libavformat

handle http error codes
author alex
date Tue, 06 Mar 2007 13:38:41 +0000
parents 54f814d6708c
children 58f48e9350af
files http.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/http.c	Mon Mar 05 17:54:49 2007 +0000
+++ b/http.c	Tue Mar 06 13:38:41 2007 +0000
@@ -169,6 +169,9 @@
 #ifdef DEBUG
         printf("http_code=%d\n", s->http_code);
 #endif
+        /* error codes are 4xx and 5xx */
+        if (s->http_code >= 400 && s->http_code < 600)
+            return -1;
     } else {
         while (*p != '\0' && *p != ':')
             p++;