[FFmpeg-devel] [PATCH] increment initial_prog_date_time when removing old segments

Steven Liu lingjiujianke at gmail.com
Fri Nov 11 11:23:28 EET 2016


2016-11-11 17:13 GMT+08:00 Robert Nagy <ronag89 at gmail.com>:

> Fixes https://trac.ffmpeg.org/ticket/5940#ticket
>
> ---
>  libavformat/hlsenc.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index 9ca2df7..80a598a 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;
> +        initial_prog_date_time += segment->duration;
>          previous_segment = segment;
>          segment = previous_segment->next;
>          if (playlist_duration <= -previous_segment->duration) {
> --
> 2.10.0
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


LGTM

Thanks


More information about the ffmpeg-devel mailing list