diff --git a/libavformat/http.c b/libavformat/http.c index 092151f2b4456aa2267347f81d91f348d2bae36d..46b18140f827e94f5e4ebd37e137821b5fb5a90f 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++;