[FFmpeg-devel] [PATCH 1/4] Reset vs->start_pos when beginning a new file

Amit Kale amitk at hotstar.com
Wed Sep 26 08:54:46 EEST 2018


Reset vs->start_pos when beginning a new file.

Signed-off-by: Amit Kale<amitk at hotstar.com>
---
  libavformat/hlsenc.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

Index: ffmpeg/libavformat/hlsenc.c
===================================================================
--- ffmpeg.orig/libavformat/hlsenc.c
+++ ffmpeg/libavformat/hlsenc.c
@@ -2289,7 +2289,10 @@ static int hls_write_packet(AVFormatCont
          }
  
          if (hls->segment_type != SEGMENT_TYPE_FMP4) {
-            vs->start_pos = new_start_pos;
+            if (hls->flags & HLS_SINGLE_FILE)
+                vs->start_pos = new_start_pos;
+            else
+                vs->start_pos = 0;
          } else {
              vs->start_pos += vs->size;
          }


More information about the ffmpeg-devel mailing list