2018-03-24 6:42 GMT+08:00 Jan Ekström <jee...@gmail.com>: > 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); This is not correct, at the specification author said, the duration should set to 5, not 6, reference link :https://trac.ffmpeg.org/ticket/6915
Thanks Steven _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel