From de43c227fd7d4e8e5fdc3b26f9bc1702514c2c0a Mon Sep 17 00:00:00 2001 From: "kjeyapal@akamai.com" Date: Sun, 21 Oct 2018 06:50:51 +0530 Subject: [PATCH] avformat/dashenc: Support HTTP persistent for init segments as well --- libavformat/dashenc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index b0a59af3ee..4e2ea2ebf2 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -355,8 +355,11 @@ static int flush_init_segment(AVFormatContext *s, OutputStream *os) return ret; os->pos = os->init_range_length = range_length; - if (!c->single_file) - ff_format_io_close(s, &os->out); + if (!c->single_file) { + char filename[1024]; + snprintf(filename, sizeof(filename), "%s%s", c->dirname, os->initfile); + dashenc_io_close(s, &os->out, filename); + } return 0; }