avformat/hlsenc: correctly compute target duration
authorNicolas Martyanoff <khaelin@gmail.com>
Mon, 7 Jul 2014 11:26:12 +0000 (13:26 +0200)
committerAnssi Hannula <anssi.hannula@iki.fi>
Wed, 9 Jul 2014 22:31:04 +0000 (01:31 +0300)
commit6cc1fec41263add956b35af96d7c4a81c9436a65
treeb7164042473fff28203d99c00be7b24402dc8065
parent92c29914de3da5776adea361bd3add0c1969b883
avformat/hlsenc: correctly compute target duration

With HLS, the duration of all segments must be lower or equal to the target
duration. Therefore floor(duration + 0.5) yields incorrect results.

For example, for duration = 1.35, floor(duration + 0.5) yields 1.0, but the
correct result is 2.0.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
libavformat/hlsenc.c