Commit a4d58c97 authored by Rodger Combs's avatar Rodger Combs Committed by Michael Niedermayer

lavf/http: handle case where the server returns a redirect during a seek

txoffer (e.g. http://tori.aoi-chan.com/ ) redirects to the same URI on your
first request, and serves the actual file on the second. It's stupid, but AFAIK
technically compliant. We'd previously see the server not handing back a Range
header and return an error; now, instead, we see that there's a redirect and
keep track of the offset we want while trying again at the new URL.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f7f71b57
......@@ -917,6 +917,9 @@ static int http_connect(URLContext *h, const char *path, const char *local_path,
if (err < 0)
goto done;
if (*new_location)
s->off = off;
err = (off == s->off) ? 0 : -1;
done:
av_freep(&authstr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment