Commit e35c0ee0 authored by Stefano Sabatini's avatar Stefano Sabatini

lavf/segment: fix computation of M3U8 segment target duration

Use ceil on the max duration, rather than approximating it to the nearest
integer.
parent a21f65b5
......@@ -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");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment