summaryrefslogtreecommitdiff
path: root/libavformat/hlsenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/hlsenc.c')
-rw-r--r--libavformat/hlsenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index bbc2742dc7..b850b1a320 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -269,8 +269,13 @@ static void hlsenc_io_close(AVFormatContext *s, AVIOContext **pb, char *filename
if (!http_base_proto || !hls->http_persistent || hls->key_info_file || hls->encrypt) {
ff_format_io_close(s, pb);
+#if CONFIG_HTTP_PROTOCOL
} else {
+ URLContext *http_url_context = ffio_geturlcontext(*pb);
+ av_assert0(http_url_context);
avio_flush(*pb);
+ ffurl_shutdown(http_url_context, AVIO_FLAG_WRITE);
+#endif
}
}