From: Jan Ekström <jan.ekst...@aminocom.com> Follows the RFC with floating point durations. F.ex., 5.005 => 6
Signed-off-by: Jan Ekström <jan.ekst...@aminocom.com> --- libavformat/hlsenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 07569dbff1..ecb581acb9 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -1386,7 +1386,8 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs) for (en = vs->segments; en; en = en->next) { if (target_duration <= en->duration) - target_duration = lrint(en->duration); + /* Target duration has to always be exactly or longer than any segment */ + target_duration = ceil(en->duration); } vs->discontinuity_set = 0; -- 2.14.3 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel