avformat/dashenc: avformat/dashenc: Fix the EXT-X-TARGETDURATION as per the hls speci...
authorKarthick J <kjeyapal@akamai.com>
Thu, 21 Dec 2017 23:44:51 +0000 (07:44 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Thu, 21 Dec 2017 23:44:51 +0000 (07:44 +0800)
libavformat/dashenc.c

index 5687530..5368a23 100644 (file)
@@ -358,7 +358,7 @@ static void output_segment_list(OutputStream *os, AVIOContext *out, DASHContext
             Segment *seg = os->segments[i];
             double duration = (double) seg->duration / timescale;
             if (target_duration <= duration)
-                target_duration = hls_get_int_from_double(duration);
+                target_duration = lrint(duration);
         }
 
         ff_hls_write_playlist_header(out_hls, 6, -1, target_duration,