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
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel