[FFmpeg-cvslog] increment initial_prog_date_time when removing old segments

Robert Nagy git at videolan.org
Sat Nov 12 11:16:24 EET 2016


ffmpeg | branch: master | Robert Nagy <ronag89 at gmail.com> | Fri Nov 11 21:56:00 2016 +0800| [c0dc9df2cc6321155e8a7a2a6c66be54746e5c13] | committer: Steven Liu

increment initial_prog_date_time when removing old segments

Fixes https://trac.ffmpeg.org/ticket/5940#ticket

Reviewed-by: Michael Niedermayer <<michael at niedermayer.cc>>
Signed-off-by: Robert Nagy <ronag89 at gmail.com>
Signed-off-by: Steven Liu <lingjiujianke at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c0dc9df2cc6321155e8a7a2a6c66be54746e5c13
---

 libavformat/hlsenc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 9ca2df7..e16fb0c 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -183,6 +183,7 @@ static int hls_delete_old_segments(HLSContext *hls) {
     segment = hls->old_segments;
     while (segment) {
         playlist_duration -= segment->duration;
+        hls->initial_prog_date_time += segment->duration;
         previous_segment = segment;
         segment = previous_segment->next;
         if (playlist_duration <= -previous_segment->duration) {



More information about the ffmpeg-cvslog mailing list