[FFmpeg-devel] [PATCH 2/2] Advertise current segment in streaming mode
Kevin LaFlamme
kevin at aiera.com
Thu Jun 24 15:58:08 EEST 2021
In streaming mode when using a segment list, the current segment should
be listed so that clients can immediately request it even before
complete. Without this, even though the segment is being written in a
way that it can be requested while still writing, clients won't know
it's available.
---
libavformat/dashenc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 2b8fbcbe6e..901999324f 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -706,6 +706,8 @@ static void output_segment_list(OutputStream *os, AVIOContext *out, AVFormatCont
Segment *seg = os->segments[i];
avio_printf(out, "\t\t\t\t\t<SegmentURL media=\"%s\" />\n", seg->file);
}
+ if (c->streaming)
+ avio_printf(out, "\t\t\t\t\t<SegmentURL media=\"%s\" />\n", os->filename);
avio_printf(out, "\t\t\t\t</SegmentList>\n");
}
if (!c->lhls || final) {
--
2.31.1
More information about the ffmpeg-devel
mailing list