diff --git a/libavformat/http.c b/libavformat/http.c index dde91b91e2..d9931cae36 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -233,7 +233,11 @@ static int http_open_cnx_internal(URLContext *h, AVDictionary **options) if (err < 0) goto end; } + } else if (strcmp(proto, "http")) { + err = AVERROR(EINVAL); + goto end; } + if (port < 0) port = 80;