aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-08-18 22:27:49 +0200
committerStefano Sabatini <stefasab@gmail.com>2012-08-18 22:46:12 +0200
commite35c0ee05c46831de07d38a4cb421de520bcf665 (patch)
tree1e8336519e10fe40673103475f55bc580ee60632
parenta21f65b55e2e760fb2d60e33598143a16d887539 (diff)
downloadffmpeg-e35c0ee05c46831de07d38a4cb421de520bcf665.tar.gz
lavf/segment: fix computation of M3U8 segment target duration
Use ceil on the max duration, rather than approximating it to the nearest integer.
-rw-r--r--libavformat/segment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c
index db96a4104d..e148dc020b 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -139,7 +139,7 @@ static void segment_list_close(AVFormatContext *s)
if (seg->list_type == LIST_TYPE_M3U8) {
avio_printf(seg->list_pb, "#EXT-X-TARGETDURATION:%d\n",
- (int)(seg->list_max_segment_time + 0.5));
+ (int)ceil(seg->list_max_segment_time));
avio_printf(seg->list_pb, "#EXT-X-ENDLIST\n");
}