lavf/segment: fix computation of M3U8 segment target duration
Use ceil on the max duration, rather than approximating it to the nearest integer.
This commit is contained in:
parent
a21f65b55e
commit
e35c0ee05c
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ static void segment_list_close(AVFormatContext *s)
|
||||||
|
|
||||||
if (seg->list_type == LIST_TYPE_M3U8) {
|
if (seg->list_type == LIST_TYPE_M3U8) {
|
||||||
avio_printf(seg->list_pb, "#EXT-X-TARGETDURATION:%d\n",
|
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");
|
avio_printf(seg->list_pb, "#EXT-X-ENDLIST\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue