diff --git a/libavformat/http.c b/libavformat/http.c index 80c87f786a..dfb95642c0 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -248,6 +248,8 @@ fail: if (s->hd) ffurl_close(s->hd); s->hd = NULL; + if (location_changed < 0) + return location_changed; return AVERROR(EIO); }