diff --git a/libavformat/http.c b/libavformat/http.c index d12dcaac16..dfc01eee4c 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -250,6 +250,8 @@ redo: fail: if (s->hd) ffurl_closep(&s->hd); + if (location_changed < 0) + return location_changed; return ff_http_averror(s->http_code, AVERROR(EIO)); }