diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 9ca2df7bf2..e16fb0caa9 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) {