X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fhlsproto.c;h=9e78f931e87a8ce13e36f891b93a6fcf5deca488;hb=11cb635c84cd5d011abc2aade27c7498bcf29595;hp=e7ef2d88ea8d080594cc825f611b13076ad02ae5;hpb=217ad40aef9eeeff4e805dec3e980fb16aec3345;p=ffmpeg diff --git a/libavformat/hlsproto.c b/libavformat/hlsproto.c index e7ef2d88ea8..9e78f931e87 100644 --- a/libavformat/hlsproto.c +++ b/libavformat/hlsproto.c @@ -22,7 +22,7 @@ /** * @file * Apple HTTP Live Streaming Protocol Handler - * http://tools.ietf.org/html/draft-pantos-http-live-streaming + * https://www.rfc-editor.org/rfc/rfc8216.txt */ #include "libavutil/avstring.h" @@ -178,7 +178,7 @@ static int hls_close(URLContext *h) free_segment_list(s); free_variant_list(s); - ffurl_close(s->seg_hd); + ffurl_closep(&s->seg_hd); return 0; } @@ -260,8 +260,7 @@ start: return ret; } if (s->seg_hd) { - ffurl_close(s->seg_hd); - s->seg_hd = NULL; + ffurl_closep(&s->seg_hd); s->cur_seq_no++; } reload_interval = s->n_segments > 0 ? @@ -295,7 +294,7 @@ retry: } goto retry; } - url = s->segments[s->cur_seq_no - s->start_seq_no]->url, + url = s->segments[s->cur_seq_no - s->start_seq_no]->url; av_log(h, AV_LOG_DEBUG, "opening %s\n", url); ret = ffurl_open_whitelist(&s->seg_hd, url, AVIO_FLAG_READ, &h->interrupt_callback, NULL,