mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f7f71b5795
commit
a4d58c97d0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user