summaryrefslogtreecommitdiff
path: root/libavformat/http.c
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2007-03-06 13:38:41 +0000
committerAlex Beregszaszi <alex@rtfs.hu>2007-03-06 13:38:41 +0000
commit7b19aa64dc2d41cce478445a47e700839b399544 (patch)
treeb1ed8bacd6691c91cc3a385f45c1c346e9b5a5fb /libavformat/http.c
parentd0a5513b8812716537ea1ed1f2231f03978d22cb (diff)
handle http error codes
Originally committed as revision 8272 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/http.c')
-rw-r--r--libavformat/http.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index 092151f2b4..46b18140f8 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -169,6 +169,9 @@ static int process_line(URLContext *h, char *line, int line_count,
#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++;