[FFmpeg-devel] [PATCH 1/3] Fix computation of vs->start_pos
Amit Kale
amitk at hotstar.com
Mon Feb 12 10:53:07 EET 2018
Reset vs->start_pos when beginning a new file.
---
libavformat/hlsenc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index cc13c94e97..9970c4c575 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2227,7 +2227,10 @@ static int hls_write_packet(AVFormatContext *s,
AVPacket *pkt)
ff_format_io_close(s, &vs->out);
}
ret = hls_append_segment(s, hls, vs, vs->duration,
vs->start_pos, vs->size);
- vs->start_pos = new_start_pos;
+ if (hls->flags & HLS_SINGLE_FILE)
+ vs->start_pos = new_start_pos;
+ else
+ vs->start_pos = 0;
if (ret < 0) {
av_free(old_filename);
return ret;
--
2.14.1
More information about the ffmpeg-devel
mailing list