History

avformat/hls: pass http offset options to http request

made with persistent connections to prevent incorrect reset of offset when demuxing HLS+FMP4

vectronic committed 7 years ago

Commit b21c5ef1 parent e81c6861 file · +4 −4Browse files

Unified · Split

libavformat/hls.c+4−4
@@ -594,7 +594,7 @@ static int ensure_playlist(HLSContext *c, struct playlist **pls, const char *url · 593 unmodified lines
594594 }
595595
596596 static int open_url_keepalive(AVFormatContext *s, AVIOContext **pb,
597− const char *url)
597+ const char *url, AVDictionary **options)
598598 {
599599 #if !CONFIG_HTTP_PROTOCOL
600600 return AVERROR_PROTOCOL_NOT_FOUND;
@@ -603,7 +603,7 @@ static int open_url_keepalive(AVFormatContext *s, AVIOContext **pb, · 2 unmodified lines
603603 URLContext *uc = ffio_geturlcontext(*pb);
604604 av_assert0(uc);
605605 (*pb)->eof_reached = 0;
606− ret = ff_http_do_new_request(uc, url);
606+ ret = ff_http_do_new_request2(uc, url, options);
607607 if (ret < 0) {
608608 ff_format_io_close(s, pb);
609609 }
@@ -656,7 +656,7 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url, · 46 unmodified lines
656656 av_dict_copy(&tmp, opts2, 0);
657657
658658 if (is_http && c->http_persistent && *pb) {
659− ret = open_url_keepalive(c->ctx, pb, url);
659+ ret = open_url_keepalive(c->ctx, pb, url, &tmp);
660660 if (ret == AVERROR_EXIT) {
661661 av_dict_free(&tmp);
662662 return ret;
@@ -714,7 +714,7 @@ static int parse_playlist(HLSContext *c, const char *url, · 51 unmodified lines
714714
715715 if (is_http && !in && c->http_persistent && c->playlist_pb) {
716716 in = c->playlist_pb;
717− ret = open_url_keepalive(c->ctx, &c->playlist_pb, url);
717+ ret = open_url_keepalive(c->ctx, &c->playlist_pb, url, NULL);
718718 if (ret == AVERROR_EXIT) {
719719 return ret;
720720 } else if (ret < 0) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t