diff http.c @ 1881:a7abdfdb5ed7 libavformat

handle http error codes
author alex
date Tue, 06 Mar 2007 13:38:41 +0000
parents c704f9d730bf
children 663139d56669
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++;