mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-01 02:00:50 +00:00
applehttp: don't use deprecated url_ functions.
This commit is contained in:
parent
d6bbe76124
commit
a6aa7a1a14
@ -113,7 +113,7 @@ static void free_variant_list(AppleHTTPContext *c)
|
|||||||
av_free_packet(&var->pkt);
|
av_free_packet(&var->pkt);
|
||||||
av_free(var->pb.buffer);
|
av_free(var->pb.buffer);
|
||||||
if (var->input)
|
if (var->input)
|
||||||
url_close(var->input);
|
ffurl_close(var->input);
|
||||||
if (var->ctx) {
|
if (var->ctx) {
|
||||||
var->ctx->pb = NULL;
|
var->ctx->pb = NULL;
|
||||||
av_close_input_file(var->ctx);
|
av_close_input_file(var->ctx);
|
||||||
@ -291,18 +291,18 @@ reload:
|
|||||||
goto reload;
|
goto reload;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = url_open(&v->input,
|
ret = ffurl_open(&v->input,
|
||||||
v->segments[v->cur_seq_no - v->start_seq_no]->url,
|
v->segments[v->cur_seq_no - v->start_seq_no]->url,
|
||||||
AVIO_RDONLY);
|
AVIO_RDONLY);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
ret = url_read(v->input, buf, buf_size);
|
ret = ffurl_read(v->input, buf, buf_size);
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
return ret;
|
return ret;
|
||||||
if (ret < 0 && ret != AVERROR_EOF)
|
if (ret < 0 && ret != AVERROR_EOF)
|
||||||
return ret;
|
return ret;
|
||||||
url_close(v->input);
|
ffurl_close(v->input);
|
||||||
v->input = NULL;
|
v->input = NULL;
|
||||||
v->cur_seq_no++;
|
v->cur_seq_no++;
|
||||||
|
|
||||||
@ -435,7 +435,7 @@ static int recheck_discard_flags(AVFormatContext *s, int first)
|
|||||||
av_log(s, AV_LOG_INFO, "Now receiving variant %d\n", i);
|
av_log(s, AV_LOG_INFO, "Now receiving variant %d\n", i);
|
||||||
} else if (first && !v->cur_needed && v->needed) {
|
} else if (first && !v->cur_needed && v->needed) {
|
||||||
if (v->input)
|
if (v->input)
|
||||||
url_close(v->input);
|
ffurl_close(v->input);
|
||||||
v->input = NULL;
|
v->input = NULL;
|
||||||
v->needed = 0;
|
v->needed = 0;
|
||||||
changed = 1;
|
changed = 1;
|
||||||
@ -517,7 +517,7 @@ static int applehttp_read_seek(AVFormatContext *s, int stream_index,
|
|||||||
struct variant *var = c->variants[i];
|
struct variant *var = c->variants[i];
|
||||||
int64_t pos = 0;
|
int64_t pos = 0;
|
||||||
if (var->input) {
|
if (var->input) {
|
||||||
url_close(var->input);
|
ffurl_close(var->input);
|
||||||
var->input = NULL;
|
var->input = NULL;
|
||||||
}
|
}
|
||||||
av_free_packet(&var->pkt);
|
av_free_packet(&var->pkt);
|
||||||
|
Loading…
Reference in New Issue
Block a user